From 05c44b6fd273ae1279829961fbf4e2cbf34c3028 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Thu, 29 Aug 2019 12:55:14 +0200 Subject: [PATCH] upload coverage only on push events --- .github/workflows/test.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 088e22027b2..3ea71ca0f21 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -71,7 +71,13 @@ jobs: flags: unit - name: Send integration tests coverage to Codecov - if: matrix.operating-system != 'windows-2019' + # Since secrets aren't available on forks, we only + # upload coverage on `push`. This might change if + # Codecov whitelists GitHub, lifting the need + # for a token. + if: > + matrix.operating-system != 'windows-2019' && + github.event_name == 'push' uses: codecov/codecov-action@v1.0.2 with: token: ${{secrets.CODECOV_TOKEN}}