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

Adds pre-commit hook and CI step in test to ensure no migrations are missing #1509

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
pip install --upgrade pip
pip install -r requirements/local.txt

- name: Check for missing migrations
run: |
python manage.py makemigrations --check --dry-run --noinput

- name: Configure environment
run: |
echo "JWKS_BASE64=$(python manage.py generate_jwks)" >> $GITHUB_ENV
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ repos:
- id: flake8
args: ["--config=.flake8"]
additional_dependencies: [flake8-isort]

- repo: local
hooks:
- id: django-migrations-check
name: check django migrations
language: system
entry: .venv/bin/python manage.py makemigrations --dry-run --check --noinput
pass_filenames: false
exclude: migrations
types: [python]
Loading