Skip to content

Commit

Permalink
CI: check for up-to-date migrations (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran authored May 30, 2024
2 parents dd13db0 + 52e0906 commit e7d42d3
Showing 1 changed file with 38 additions and 0 deletions.
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

0 comments on commit e7d42d3

Please sign in to comment.