Skip to content

Commit

Permalink
fix: Normalize the option to post coverage as PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cicdguy committed Feb 13, 2024
1 parent 01672bb commit fe49be2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,16 @@ jobs:
echo "ref-name=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_OUTPUT
fi
# Check if pkgdown multiversion docs are used at all.
echo "multiversion-docs=false" >> $GITHUB_OUTPUT
if [ $(grep -rl '<!-- start dropdown for versions -->' gh-pages | wc -l) -gt 0 ]; then
echo "multiversion-docs=true" >> $GITHUB_OUTPUT
else
echo "multiversion-docs=false" >> $GITHUB_OUTPUT
fi
# Normalize the 'publish-coverage-report' option
echo "publish-coverage-report=${{ inputs.publish-coverage-report }}" >> $GITHUB_OUTPUT
if [ "${{ inputs.publish-coverage-report }}" == "" ]
then {
echo "publish-coverage-report=true" >> $GITHUB_OUTPUT
}
fi
shell: bash

Expand Down Expand Up @@ -271,7 +277,7 @@ jobs:
path: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }}/coverage.xml
threshold: 80
fail: false
publish: ${{ inputs.publish-coverage-report }}
publish: ${{ steps.current-branch-or-tag.outputs.publish-coverage-report }}
diff: true
continue-on-error: true

Expand Down

0 comments on commit fe49be2

Please sign in to comment.