Build #681
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '27 5 * * SAT' | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| django-version: | |
| - "4.1" | |
| - "4.2" | |
| - "5.0" | |
| - "5.1" | |
| python-version: | |
| - "3.8" | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| exclude: | |
| - django-version: "4.1" | |
| python-version: "3.12" | |
| - django-version: "4.1" | |
| python-version: "3.13" | |
| - django-version: "4.2" | |
| python-version: "3.8" | |
| - django-version: "4.2" | |
| python-version: "3.12" | |
| - django-version: "4.2" | |
| python-version: "3.13" | |
| - django-version: "5.0" | |
| python-version: "3.8" | |
| - django-version: "5.0" | |
| python-version: "3.9" | |
| - django-version: "5.0" | |
| python-version: "3.13" | |
| - django-version: "5.1" | |
| python-version: "3.8" | |
| - django-version: "5.1" | |
| python-version: "3.9" | |
| services: | |
| pg: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: aldjemy | |
| ports: | |
| - 5432:5432 | |
| env: | |
| SQLALCHEMY_WARN_20: 1 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v6 | |
| - run: uv python install ${{ matrix.python-version }} | |
| - run: uv sync | |
| - run: uv run --with 'django~=${{ matrix.django-version }}.0' pytest --cov --cov-report= | |
| - name: Rename coverage file | |
| run: mv .coverage .coverage.py${{ matrix.python-version }}.dj${{ matrix.django-version }} | |
| - name: Save coverage file | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: .coverage.py${{ matrix.python-version }}.dj${{ matrix.django-version }} | |
| path: .coverage.py${{ matrix.python-version }}.dj${{ matrix.django-version }} | |
| include-hidden-files: true | |
| codecov: | |
| needs: pytest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v6 | |
| - run: uv python install 3.13 | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: .coverage.* | |
| merge-multiple: true | |
| - name: Combine coverage | |
| run: | | |
| uv run coverage combine | |
| uv run coverage xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |