Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added isort, flake8 and mypy #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/service-build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,23 @@ jobs:
run: |
docker run --entrypoint "" ${{ env.IMAGE_NAME }} black --target-version py310 -S --check /usr/src/app

- name: Run isort
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' && success() || failure() }}
run: |
docker run --entrypoint "" ${{ env.IMAGE_NAME }} isort --check-only --profile black ${{ steps.changed-py-files.outputs.all_changed_files }}

- name: Run flake8
if: ${{steps.changed-py-files.outputs.any_changed == 'true' && success() || failure() }}
run: |
docker run --entrypoint "" ${{ env.IMAGE_NAME }} flake8 ${{ steps.changed-py-files.outputs.all_changed_files }}

- name: Run mypy
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' && success() || failure() }}
run: |
docker run --entrypoint "" ${{ env.IMAGE_NAME }} mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --follow-imports=silent --non-interactive

- name: Run tests
if: success()
run: |
docker run -e "DJANGO_DUMMY_ENV=True" -e POSTGRES_HOST="localhost" \
-e POSTGRES_PASSWORD -e POSTGRES_DB -e POSTGRES_USER \
Expand Down