From f50450c0a916ae265372f7dc7b9a21b1bec83b67 Mon Sep 17 00:00:00 2001 From: Andrea Waltlova Date: Tue, 22 Oct 2024 10:13:03 +0200 Subject: [PATCH] Add codecov upload for forks and main (#54) With codecov v4+ forks are detected automatically and tokenless upload is used Signed-off-by: Andrea Waltlova Signed-off-by: Andrea Waltlova --- .github/workflows/unit_tests.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 36df42259..b0aec73b6 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -19,4 +19,9 @@ 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) + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}