chore(deps): lock file maintenance #2917
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: CI | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - "main" | |
| tags: | |
| - "*" | |
| env: | |
| UV_FROZEN: "true" | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.10" | |
| postgres-version: "14" | |
| - python-version: "3.11" | |
| postgres-version: "15" | |
| - python-version: "3.12" | |
| postgres-version: "16" | |
| - python-version: "3.13" | |
| postgres-version: "17" | |
| - python-version: "3.14" | |
| postgres-version: "18" | |
| name: "py${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres-version }} | |
| # Set health checks to wait until postgres has started | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: 0 # Fetch all history for the current branch, needed for checking migrations | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run tests | |
| run: uv run pytest --cov=procrastinate --cov-branch | |
| env: | |
| COVERAGE_FILE: ".coverage.${{ matrix.python-version }}" | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| PY_COLORS: 1 | |
| - name: Store coverage file | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-${{ matrix.python-version }} | |
| path: .coverage.${{ matrix.python-version }} | |
| include-hidden-files: true | |
| acceptance-tests: | |
| strategy: | |
| matrix: | |
| mode: | |
| - "current_version_without_post_migration" | |
| - "stable_version_without_post_migration" | |
| name: "e2e ${{ matrix.mode }}" | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18 | |
| # Set health checks to wait until postgres has started | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| with: | |
| python-version: "3.14" | |
| - name: Get latest tag | |
| id: get-latest-tag | |
| run: gh release list --limit 1 --json tagName --jq '"latest_tag="+.[0].tagName' >> $GITHUB_OUTPUT | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests | |
| run: uv run --only-group migration_test nox -s ${{ matrix.mode }} | |
| env: | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| LATEST_TAG: ${{ steps.get-latest-tag.outputs.latest_tag }} | |
| static-typing: | |
| name: Run type checking | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| - name: Install deps | |
| run: uv sync --all-groups | |
| - name: Run type checker | |
| run: uv run basedpyright | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| needs: [tests] | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: coverage-* | |
| merge-multiple: true | |
| - name: Display coverage | |
| uses: ewjoachim/python-coverage-comment-action@v3 | |
| with: | |
| MERGE_COVERAGE_FILES: true | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Store Pull Request comment to be posted | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: python-coverage-comment-action | |
| path: python-coverage-comment-action.txt | |
| benchmark: | |
| name: Benchmark | |
| runs-on: ubuntu-latest | |
| permissions: | |
| deployments: write | |
| contents: write | |
| services: | |
| postgres: | |
| image: postgres:18 | |
| # Set health checks to wait until postgres has started | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| with: | |
| python-version: "3.14" | |
| - name: Run benchmarks | |
| run: uv run pytest -m "benchmark" --benchmark-json output.json | |
| env: | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| - name: Store benchmark result | |
| if: github.event_name == 'push' && github.ref_type == 'branch' | |
| uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1 | |
| with: | |
| name: Procrastinate Benchmarks | |
| tool: "pytest" | |
| output-file-path: output.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true | |
| publish: | |
| name: Publish package to PyPI | |
| if: github.event_name == 'push' && github.ref_type == 'tag' | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| needs: | |
| - tests | |
| - static-typing | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-tags: true | |
| ref: ${{ github.ref }} | |
| - name: Build wheel & sdist | |
| run: pipx run uv build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |