Skip to content

Commit

Permalink
check dependency graph in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Jan 26, 2023
1 parent 14b9d02 commit 6b30c63
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function dockercompose {

echo "Check dependency graph and fix requirements"

dockercompose run -T --user root --rm web bash -c "pip-compile -q && pip-compile requirements-dev.in"
dockercompose run -T --rm web bash -c "pip-compile -q && pip-compile requirements-dev.in"



Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ env:
DEBIAN_FRONTEND: noninteractive

jobs:
flake8:
name: Check code styling
quality:
name: Checking dependency graph and code quality
runs-on: ubuntu-18.04

steps:
Expand All @@ -29,6 +29,25 @@ jobs:
pip3 install --upgrade pip wheel setuptools
pip3 install -r requirements-dev.txt -U
- name: Check dependency graph
run: |
pip-compile -q
pip-compile -q requirements-dev.in
- name: Verify dependency graph is ok
uses: tj-actions/verify-changed-files@v13
id: verify-changed-files
with:
files: |
requirements.txt
requirements-dev.txt
- name: Validating graph
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Dependency file(s) changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
core.setFailed('Please add your new dependencies in setup.py and/or requirements-dev.in then run pip-compile to add them in requirements.')
- name: Flake8
run: |
flake8 geotrek
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ amqp==5.1.1
# via kombu
appy==1.0.11
# via django-appypod
django-geostore
asgiref==3.4.1
# via django
async-timeout==4.0.2
Expand Down

0 comments on commit 6b30c63

Please sign in to comment.