INTPYTHON-582 Add release workflows #12
Workflow file for this run
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: Python Tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| concurrency: | |
| group: tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -eux {0} | |
| permissions: | |
| contents: read | |
| env: | |
| MIN_PYTHON: "3.10" | |
| MIN_MONGODB: "6.0" | |
| MAX_MONGODB: "8.0" | |
| jobs: | |
| static: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | |
| - run: just lint | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| fail-fast: false | |
| name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | |
| - name: Start MongoDB on Linux | |
| if: ${{ startsWith(runner.os, 'Linux') }} | |
| uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0 | |
| with: | |
| mongodb-version: ${{ env.MAX_MONGODB }} | |
| mongodb-replica-set: test-rs | |
| - run: just test | |
| build-min: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ env.MIN_PYTHON }} | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ env.MIN_PYTHON }} | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | |
| - uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0 | |
| with: | |
| mongodb-version: ${{ env.MIN_MONGODB }} | |
| mongodb-replica-set: test-rs | |
| - name: Run unit tests with minimum dependency versions | |
| run: | | |
| uv sync --python=${MIN_PYTHON} --resolution=lowest-direct | |
| just test |