Skip to content

First attempt at a github action that checks django migrations #1

First attempt at a github action that checks django migrations

First attempt at a github action that checks django migrations #1

name: Check that migrations are up to date
on: [push, pull_request]
jobs:
check:
runs-on: debian-bookworm
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install temporary dummy configuration
run: |
cat <<EOF > pgweb/settings_local.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.dummy',
}
}
EOF
- name: Check django migrations
run: |
python3 ./manage.py makemigrations --check