From 2c34167131d8c8089176a3bb08d9c4b73d7a6d6f Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 28 Nov 2020 15:48:30 +0100 Subject: [PATCH] Check for `--coverage` flag. --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 464e174d86..649595fe6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -197,13 +197,15 @@ jobs: fi if ${{ runner.os == 'macOS' }}; then - # Set variables for coverage reporting. - export HOMEBREW_CODECOV_TOKEN='3ea0364c-80ce-47a3-9fba-93a940d4b5d7' - # These cannot be queried at the macOS level on GitHub Actions. export HOMEBREW_LANGUAGES='en-GB' fi + if ${{ contains(matrix.test-flags, '--coverage') }}; then + # Set variables for coverage reporting. + export HOMEBREW_CODECOV_TOKEN='3ea0364c-80ce-47a3-9fba-93a940d4b5d7' + fi + brew tests ${{ matrix.test-flags }} env: HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}