Skip to content

Commit

Permalink
#54 Add codecov upload for forks and main
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Waltlova <[email protected]>
  • Loading branch information
andywaltlova committed Oct 22, 2024
1 parent b8ad95d commit 7c24420
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ jobs:
- name: Install devel dependencies
run: pdm install --dev
- name: Run unit tests
run: pdm run python -m pytest tests/unit --cov=ols --cov=runner --cov-report term-missing
run: pdm run python -m pytest tests/unit --cov=ols --cov=runner --cov-report xml

- name: Upload coverage reports to Codecov with GitHub Action (with token)
if: github.ref == 'refs/heads/main'
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage reports to Codecov with GitHub Action (without token = forks)
if: github.ref != 'refs/heads/main'
uses: codecov/[email protected]

0 comments on commit 7c24420

Please sign in to comment.