[#3579] Store not just successful syncs, but also failures and filters with reasons #12218
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: code-quality | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| tags: | |
| - '*' | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| migrations: | |
| name: Check for model changes not present in the migrations | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:12 | |
| 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 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install system packages | |
| run: | | |
| sudo apt-get update \ | |
| && sudo apt-get install -y --no-install-recommends \ | |
| libgdal-dev \ | |
| gdal-bin \ | |
| libxml2-dev \ | |
| libxmlsec1-dev \ | |
| libxmlsec1-openssl | |
| - name: Install dependencies | |
| run: | | |
| pip install uv | |
| uv pip install -r requirements/dev.txt --system | |
| - name: Run manage.py makemigrations --check --dry-run | |
| run: | | |
| src/manage.py makemigrations --check --dry-run | |
| env: | |
| DJANGO_SETTINGS_MODULE: open_inwoner.conf.dev | |
| SECRET_KEY: dummy | |
| DB_USER: postgres | |
| DB_PASSWORD: '' | |
| pre-commit: | |
| name: Run pre-commit checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| - name: npm install | |
| run: npm install | |
| - uses: pre-commit/[email protected] | |
| ruff-version-check: | |
| name: Check ruff version consistency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check ruff versions match | |
| run: | | |
| # Extract ruff version from ci.txt | |
| CI_VERSION=$(grep "^ruff" requirements/ci.txt | sed 's/.*==//') | |
| # Extract ruff version from pre-commit config | |
| PRECOMMIT_VERSION=$(grep -A1 "repo: https://github.com/astral-sh/ruff-pre-commit" .pre-commit-config.yaml | grep "rev:" | sed 's/.*v//') | |
| echo "Ruff version in ci.txt: $CI_VERSION" | |
| echo "Ruff version in pre-commit-config.yaml: $PRECOMMIT_VERSION" | |
| if [ "$CI_VERSION" != "$PRECOMMIT_VERSION" ]; then | |
| echo "❌ ERROR: Ruff versions do not match!" | |
| echo "requirements/ci.txt has: $CI_VERSION" | |
| echo ".pre-commit-config.yaml has: $PRECOMMIT_VERSION" | |
| echo "Please update both files to use the same ruff version." | |
| exit 1 | |
| else | |
| echo "✅ SUCCESS: Ruff versions match ($CI_VERSION)" | |
| fi |