Optimize the test setup #3492
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 # For unit tests and build | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| env: | |
| USE_PYTHON_VERSION: "3.11" | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| max-parallel: 3 | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| name: pytest (python-${{ matrix.python-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/install-meridian | |
| with: | |
| python_version: ${{ matrix.python-version }} | |
| # Run tests (in parallel) | |
| - name: Run core tests | |
| run: pytest -vv -n auto | |
| build: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/build | |
| with: | |
| python_version: ${{ env.USE_PYTHON_VERSION }} | |
| # Include for sanity checking that version increment parsing and checking logic works. | |
| check-version: | |
| name: Version check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: version_check | |
| uses: ./.github/actions/version-check | |
| with: | |
| python_version: ${{ env.USE_PYTHON_VERSION }} |