Skip to content

Commit

Permalink
change condition to run coverage report generation to only run if the…
Browse files Browse the repository at this point in the history
… step to check for a fork PR is skipped, meaning the tests should run
  • Loading branch information
georgemccabe committed Sep 5, 2024
1 parent 47d61af commit 737ecda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 737ecda

Please sign in to comment.