Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Test
on:
pull_request:
branches: [master]
pull_request_target:
branches: [master]
push:
branches: [master]
schedule:
Expand All @@ -16,7 +18,10 @@ concurrency:

jobs:
pytester:
# run on both push & normal PR
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
environment: test
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -144,25 +149,14 @@ jobs:
if: matrix.backend == 'redis'
run: pytest -m redis --cov=cachier --cov-report=term --cov-report=xml:cov.xml

- name: Upload coverage to Codecov (non-PRs)
if: github.event_name != 'pull_request' # pushes, scheduled, etc.
- name: Upload coverage to Codecov (non PRs)
continue-on-error: true
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # required
flags: ${{ matrix.backend }}

# We need a separate step for PRs because PRs do not have access to
# secrets; hence, provide the token will give it an empty value,
# resulting in an authentication error.
- name: Upload coverage to Codecov (PRs)
if: github.event_name == 'pull_request' # PRs only
continue-on-error: true
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
flags: ${{ matrix.backend }}
override_pr: ${{ github.event.pull_request.number }}

testing-guardian:
runs-on: ubuntu-latest
Expand Down
Loading