diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b718f23..1f0cc25 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,7 +3,7 @@ name: Test Python package on: push: branches: - - master + - master pull_request: env: @@ -15,23 +15,25 @@ jobs: id-token: write contents: read # for private repos steps: - - uses: actions/checkout@v5 - - name: Set up uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - cache-dependency-glob: | - **/requirements*.txt - **/pyproject.toml - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: 3.14 - - name: Install dependencies - run: uv pip install nox[uv] - - name: Test with pytest - run: nox -db uv - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} + - uses: actions/checkout@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + cache-dependency-glob: | + **/requirements*.txt + **/pyproject.toml + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: 3.14 + - name: Install dependencies + run: uv pip install nox[uv] + - name: Test with pytest + run: nox -db uv + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + use_oidc: true +permissions: + id-token: write