diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f33faba..9a78c00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,7 @@ jobs: python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.15" ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERAGE_PYTHON_VERSION: "3.14" steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -40,11 +41,20 @@ jobs: run: | make lint + # coverage only runs on one version: before 3.14 it traces with sys.settrace, which slows the tests down + # several times and makes the timing-sensitive tests flaky. 3.14+ uses sys.monitoring (PEP 669). - name: Run tests + if: matrix.python-version != env.COVERAGE_PYTHON_VERSION + run: | + make test + + - name: Run tests with coverage + if: matrix.python-version == env.COVERAGE_PYTHON_VERSION run: | make test-coverage - name: Report coverage + if: matrix.python-version == env.COVERAGE_PYTHON_VERSION run: | make coveralls