Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Normalize the option to post coverage as PR comment #210

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading