Skip to content

Commit

Permalink
fix: Add flake8 and safety
Browse files Browse the repository at this point in the history
  • Loading branch information
jackylamhk committed Nov 6, 2023
1 parent 5cc6802 commit bcca713
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 \
--show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 \
--max-line-length=127 --statistics
- name: Run tests
run: poetry run pytest

- name: Dependencies safety check
run: poetry export --without-hashes -f requirements.txt | safety check --full-report --stdin
run: poetry export --without-hashes -f requirements.txt | \
poetry run safety check --full-report --stdin

build-publish:
name: Build project
Expand Down
Loading

0 comments on commit bcca713

Please sign in to comment.