Skip to content

Commit

Permalink
🔄 synced file(s) with Nef10/common-swift-package
Browse files Browse the repository at this point in the history
  • Loading branch information
file-sync-app[bot] committed Feb 9, 2024
1 parent eaa967c commit 2af024d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/coverage-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/github-script@v7.0.1
with:
Expand Down Expand Up @@ -44,8 +46,15 @@ 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/sticky-pull-request-comment@v2.8.0
uses: marocchino/sticky-pull-request-comment@v2.9.0
with:
path: comment.html
number: ${{ env.pr_number }}
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.25.0
- uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2af024d

Please sign in to comment.