From 737ecdaf97267078e6c62c7501e6d35be5a0f07b Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:07:21 -0600 Subject: [PATCH] change condition to run coverage report generation to only run if the step to check for a fork PR is skipped, meaning the tests should run --- .github/workflows/sonarqube.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index f70661d..9d386e6 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -44,6 +44,7 @@ jobs: steps: - name: Check if PR is from a fork + id: check_fork if: ${{ github.event.pull_request.head.repo.full_name != 'dtcenter/METdataio' }} run: echo "SonarQube scan cannot be run from a fork"; exit 1 - uses: actions/checkout@v4 @@ -79,11 +80,11 @@ jobs: - name: Output coverage report run: coverage report -m - if: always() + ${{ always() && steps.check_fork.conclusion == 'skipped' }} - name: Generate XML coverage report run: coverage xml - if: always() + ${{ always() && steps.check_fork.conclusion == 'skipped' }} - name: Get branch name id: get_branch_name