Skip to content

Commit

Permalink
Merge pull request #92 from MetOffice/coverage-report-comments
Browse files Browse the repository at this point in the history
Make PR coverage reports edit last comment
  • Loading branch information
jfrost-mo authored Apr 24, 2023
2 parents 0b1cb64 + 7de4b39 commit c1c06f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
badge_options="$(coverage json --fail-under=0 -qo - | jq -r .totals.percent_covered_display)%25-blue?style=for-the-badge"
echo "[![Coverage](https://img.shields.io/badge/coverage-${badge_options})](${report_url})" >> ${{ runner.temp }}/cov-report.md
echo "[Code coverage report](${report_url})" >> ${{ runner.temp }}/cov-report.md
gh pr comment ${{ github.head_ref }} --body-file ${{ runner.temp }}/cov-report.md
# Edit last comment if it exists, else create new one.
if ! gh pr comment --edit-last ${{ github.head_ref }} --body-file ${{ runner.temp }}/cov-report.md ; then
gh pr comment ${{ github.head_ref }} --body-file ${{ runner.temp }}/cov-report.md
fi
pre-commit:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dependencies:
- pip

# Development dependencies
- pip
- pre-commit
- black

Expand Down

0 comments on commit c1c06f6

Please sign in to comment.