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

CI: check for up-to-date migrations #2122

Merged
merged 3 commits into from
May 30, 2024
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/check-makemigrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check for up-to-date Django migrations
on:
pull_request:
paths:
- "benefits/**"
push:
paths:
- "benefits/**"

jobs:
check-makemigrations:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install system packages
run: |
sudo apt-get update -y
sudo apt-get install -y gettext
- uses: actions/setup-python@v5
with:
python-version-file: .github/workflows/.python-version
cache: pip
cache-dependency-path: "**/pyproject.toml"

- name: Install Python dependencies
run: pip install -e .[dev,test]

- name: Run ./bin/makemigrations.sh
run: |
if ./bin/makemigrations.sh | grep -q 'No changes detected';
then
exit 0;
else
exit 1;
fi
Loading