Optimize stateful test healthcheck #91
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: Check code and run tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
generate-jobs: | |
name: Generate build matrix for tests | |
runs-on: ubuntu-latest | |
outputs: | |
session: ${{ steps.set-matrix.outputs.session }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v6 | |
- name: Generate build matrix | |
id: set-matrix | |
shell: bash | |
run: echo session=$(uv run noxfile.py --json -l | jq -c '[.[].session]') | tee --append $GITHUB_OUTPUT | |
checks: | |
name: Run ${{ matrix.session }} | |
needs: [generate-jobs] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
session: ${{ fromJson(needs.generate-jobs.outputs.session) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v6 | |
- run: uv tool install nox --with nox-uv | |
- name: Run nox | |
run: uvx nox -s "${{ matrix.session }}" -- --coverage | |
- name: Upload coverage data | |
if: ${{ matrix.session != 'lint' }} | |
uses: coverallsapp/github-action@v2 | |
with: | |
flag-name: run-${{ join(matrix.*, '-') }} | |
parallel: true | |
debug: true | |
coveralls_finish: | |
name: Finalize coverage | |
needs: checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true |