Skip to content

Commit

Permalink
Update build to use make file.
Browse files Browse the repository at this point in the history
  • Loading branch information
chaseastewart committed Aug 16, 2024
1 parent 0a4984f commit 9e4225b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/mkdocs-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ jobs:
installer-parallel: true
- name: Install project
run: poetry install --no-interaction
- name: Build Docstrings
run: |
poetry run lazydocs --output-path="./docs/docstrings" --overview-file="README.md" \
--src-base-url="https://github.com/chaseastewart/fhir-converter/blob/master/" \
fhir_converter
- name: Build Mkdocs
run: poetry run mkdocs build --site-dir ./_site
- name: Build Docs
run: make docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ jobs:
virtualenvs-in-project: true
installer-parallel: true
- name: Install project
run: poetry install --no-interaction
run: make install
- name: flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 fhir_converter --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
poetry run flake8 fhir_converter --count --ignore=E203,E721 --exit-zero --max-complexity=10 --max-line-length=120 --statistics
make linting-check
type-check:
needs: linting-check
Expand All @@ -63,9 +60,9 @@ jobs:
virtualenvs-in-project: true
installer-parallel: true
- name: Install project
run: poetry install --no-interaction
run: make install
- name: mypy
run: poetry run mypy fhir_converter
run: make type-check

test:
needs: type-check
Expand Down Expand Up @@ -96,7 +93,7 @@ jobs:
- name: Verify Poetry Install
run: poetry --version
- name: Setup Poetry Environment
run: poetry env use '${{ steps.python.outputs.python-path }}'
run: make env PY_VERSION='${{ steps.python.outputs.python-path }}'
- name: Verify Poetry Environment
run: |
actual=$(poetry run python --version)
Expand All @@ -106,9 +103,9 @@ jobs:
exit 1
fi
- name: Install project
run: poetry install --no-interaction
run: make install
- name: Run tests
run: poetry run pytest
run: make test

cov:
needs: test
Expand All @@ -131,9 +128,9 @@ jobs:
virtualenvs-in-project: true
installer-parallel: true
- name: Install project
run: poetry install --no-interaction
run: make install
- name: Build Coverage Report
run: poetry run pytest --cov=fhir_converter --cov-report=html
run: make cov
- run: poetry run smokeshow upload htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ PY_VERSION = 3.12

env :
poetry env use $(PY_VERSION)
poetry run python --version

update-lock :
poetry lock --no-update
Expand Down

0 comments on commit 9e4225b

Please sign in to comment.