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

[#2627] Verify freshness of django-admin-index fixture in CI #1308

Closed
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
36 changes: 21 additions & 15 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,45 +83,51 @@ jobs:
python ./bin/flake8_summary.py "${{ steps.flake8.outputs.flake8_output }}" >> $GITHUB_STEP_SUMMARY

migrations:
name: Check for model changes not present in the migrations
name: Check for migration and fixture freshness
runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
image: postgis/postgis:15-3.4
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
# Needed because the postgres container does not provide a healthcheck
options:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
--name postgres

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Set up backend environment
uses: maykinmedia/setup-django-backend@v1
with:
apt-packages: 'libxml2-dev libxmlsec1-dev libxmlsec1-openssl gettext postgresql-client libgdal-dev gdal-bin'
python-version: '3.11'
- name: Install system packages
run: |
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libgdal-dev \
gdal-bin
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl
pip install -r requirements/dev.txt
optimize-postgres: 'yes'
pg-service: 'postgres'
setup-node: 'yes'
npm-ci-flags: '--legacy-peer-deps'
- name: Run manage.py makemigrations --check --dry-run
run: |
src/manage.py makemigrations --check --dry-run
env:
DJANGO_SETTINGS_MODULE: open_inwoner.conf.dev
DJANGO_SETTINGS_MODULE: open_inwoner.conf.ci
SECRET_KEY: dummy
DB_USER: postgres
DB_PASSWORD: ''

- name: Verify that django-admin-index fixture is up-to-date
run: |
src/manage.py migrate
src/manage.py loaddata django-admin-index
env:
DJANGO_SETTINGS_MODULE: open_inwoner.conf.ci
SECRET_KEY: dummy
DB_USER: postgres
DB_PASSWORD: ''

prettier:
name: Check code formatting with prettier
runs-on: ubuntu-latest
Expand Down
Loading