Skip to content

Commit a98e904

Browse files
committed
First attempt at a github action that checks django migrations
1 parent 0779820 commit a98e904

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check that migrations are up to date
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check:
7+
8+
runs-on: debian-bookworm
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Install dependencies
13+
run: |
14+
python -m pip install --upgrade pip
15+
pip install -r requirements.txt
16+
- name: Install temporary dummy configuration
17+
run: |
18+
cat <<EOF > pgweb/settings_local.py
19+
DATABASES = {
20+
'default': {
21+
'ENGINE': 'django.db.backends.dummy',
22+
}
23+
}
24+
EOF
25+
- name: Check django migrations
26+
run: |
27+
python3 ./manage.py makemigrations --check
28+

0 commit comments

Comments
 (0)