name: Django CI on: push: branches: [master] pull_request: branches: [master] jobs: build: if: "!contains(github.event.head_commit.message, '[ci skip]')" runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONDONTWRITEBYTECODE: 1 steps: - uses: actions/checkout@v4 - name: Install build dependencies run: | sudo apt-get install libcairo2-dev - name: "Set up Python" uses: actions/setup-python@v5 with: python-version-file: ".python-version" - name: Install uv uses: astral-sh/setup-uv@v6 - name: Install Dependencies run: uv sync --locked --all-extras --dev - name: Cache Static Files id: static-cache uses: actions/cache@v4 with: path: 'pipeline/built_assets' key: ${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }} - uses: bahmutov/npm-install@v1 if: steps.static-cache.outputs.cache-hit != 'true' - run: node node_modules/gulp/bin/gulp build if: steps.static-cache.outputs.cache-hit != 'true' - name: Basic Checks run: | uv run pycodestyle . --exclude=migrations,node_modules uv run python3 manage.py check uv run python3 manage.py makemigrations --check --dry-run uv run python3 manage.py collectstatic --noinput - name: Run Tests run: uv run pytest -n auto --cov - uses: actions/upload-artifact@v4 if: failure() with: name: failure-screenshots ${{ matrix.test-group }} path: screenshots/ retention-days: 5 - name: Coveralls run: uv run coveralls --service=github