Skip to content

Commit

Permalink
use pipenv for static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
TimidRobot committed Apr 4, 2024
1 parent b0150af commit c4e30b6
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 13 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@ jobs:
with:
python-version: '3.10'

- name: Install Python dependencies
- name: Install pipenv
run: |
pip install --upgrade pip
pip install black
pip install flake8
pip install isort
pip install pre-commit
pip install pipenv
# https://github.com/actions/checkout
- name: Checkout cc-legal-tools-app
uses: actions/checkout@v4
with:
path: cc-legal-tools-app

- name: Install Python dependencies
# Install _only_ [dev-packages]
run: pipenv sync --categories static-analysis --system

- name: pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
working-directory: ./cc-legal-tools-app
15 changes: 11 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ urllib3 = ">=2.0.7" # Ensure dependency is secure
whitenoise = "*"

[dev-packages]
black = ">=24.3.0"
black = ">=24.3.0" # Sync version with [static-analysis], below
coverage = "*"
django-debug-toolbar = "*"
factory-boy = "*"
flake8 = "*"
isort = "*"
pre-commit = "*"
flake8 = "*" # Sync version with [static-analysis], below
isort = "*" # Sync version with [static-analysis], below
pre-commit = "*" # Sync version with [static-analysis], below
tblib = "*" # Dependency of coverage (with --parallel)

[static-analysis]
# Also see: .github/workflows/static-analysis.yml
black = ">=24.3.0" # Sync version with [dev-packages], above
flake8 = "*" # Sync version with [dev-packages], above
isort = "*" # Sync version with [dev-packages], above
pre-commit = "*" # Sync version with [dev-packages], above

[requires]
python_version = "3.10"
253 changes: 252 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c4e30b6

Please sign in to comment.