Skip to content

Commit

Permalink
Add codecov upload for forks and main (#54)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Waltlova <awaltlov@redhat.com>
  • Loading branch information
andywaltlova committed Oct 22, 2024
1 parent b8ad95d commit 8cd73f4
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 = main repo)
if: github.repository == 'road-core/service'
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage reports to Codecov with GitHub Action (without token = forks)
if: github.repository != 'road-core/service'
uses: codecov/codecov-action@v4.2.0

0 comments on commit 8cd73f4

Please sign in to comment.