-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add info even if test failed * Print minimum required coverage
- Loading branch information
1 parent
975c92f
commit e53dc61
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,12 @@ on: | |
|
||
jobs: | ||
comment: | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} | ||
if: ${{ github.event.workflow_run.event == 'pull_request' }} | ||
name: 'Comment Code Coverage' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: 'Download artifacts' | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -44,6 +46,13 @@ jobs: | |
pr-number: ${{ env.pr_number }} | ||
hide-branch-coverage: true | ||
output-file: comment.html | ||
- name: 'Prepend minimum coverage required' | ||
run: | | ||
echo -e "Minimum coverage required: <b>$(cat ./.github/minimum_coverage.txt)%</b>\n<br />\n$(cat comment.html)" > comment.html | ||
- name: 'Prepand failure info' | ||
if: ${{ github.event.workflow_run.conclusion != 'success' }} | ||
run: | | ||
echo -e "❌ <b>Minimum coverage check failed!</b>\n<br />\n$(cat comment.html)" > comment.html | ||
- name: Post code coverage report | ||
uses: marocchino/[email protected] | ||
with: | ||
|