# For documentation on GitHub Actions Workflows, see: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions name: Tests on: pull_request: types: [opened, synchronize, reopened] push: branches: [main] jobs: tests: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] fail-fast: false runs-on: ${{ matrix.os }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v7.0.1 with: fetch-depth: 0 # Needed for setuptools_scm to work correctly - name: Install uv uses: astral-sh/setup-uv@v7 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Install the project run: uv sync --no-default-groups --group test - name: Run tests run: uv run --no-default-groups --group test python -Xutf8 -m pytest tests - name: Upload test results to Codecov if: ${{ !cancelled() }} uses: codecov/codecov-action@v7 with: flags: python${{ matrix.python-version }} name: codecov-umbrella-test-results report_type: test_results token: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v7 with: env_vars: OS,PYTHON fail_ci_if_error: true flags: unittests name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true # Single stable status check for the whole test matrix, so branch protection # doesn't need updating every time the OS/Python matrix changes. all-tests-passed: name: All Tests Passed if: always() needs: [tests] runs-on: ubuntu-latest steps: - name: Fail if any matrix job did not succeed if: needs.tests.result != 'success' run: exit 1