From a02b17fbccb4e51041b2f6aa60c9b6fbb67e9fd4 Mon Sep 17 00:00:00 2001 From: Timothy Trowbridge Date: Thu, 3 Apr 2025 10:45:59 +0200 Subject: [PATCH 1/4] Add CI post-comment workflow and update coverage report handling --- .github/workflows/ci-post-comment.yml | 25 +++++++++++++++++++++++++ .github/workflows/ci.yml | 7 +++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci-post-comment.yml diff --git a/.github/workflows/ci-post-comment.yml b/.github/workflows/ci-post-comment.yml new file mode 100644 index 0000000..7e11118 --- /dev/null +++ b/.github/workflows/ci-post-comment.yml @@ -0,0 +1,25 @@ +name: CI Post Comment +on: + workflow_run: + workflows: ["CI"] + types: + - completed +jobs: + post-comment: + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }} + runs-on: ubuntu-latest + steps: + - name: Download code-coverage-results + uses: actions/download-artifact@v4 + with: + name: analysis-results + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + recreate: true + path: code-coverage-results.md + number: ${{ github.event.workflow_run.pull_requests[0].number }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4d672a..1ea1dbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,9 +96,8 @@ jobs: format: markdown output: both - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 - if: github.event_name == 'pull_request' + - name: Upload Coverage Summary Report + uses: actions/upload-artifact@v4 with: - recreate: true path: code-coverage-results.md + name: code-coverage-results From 61143bfa8a294107790b3e4a08282501cdf4ddec Mon Sep 17 00:00:00 2001 From: Timothy Trowbridge Date: Thu, 3 Apr 2025 10:53:21 +0200 Subject: [PATCH 2/4] Update CHANGELOG.md to reflect split of CI workflow into separate processes --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a360e0..e1b3d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Split up `CI` workflow into two separate workflows for the comment posting for forks will work + ## [1.2.1] - 2025-03-18 ### dependabot: \#57 Bump tj-actions/changed-files from 41 to 46 in /.github/workflows From 1708e42c0587feddc6ec0bfa45c7c7f6daa22f8b Mon Sep 17 00:00:00 2001 From: Timothy Trowbridge Date: Thu, 3 Apr 2025 10:56:42 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md to clarify CI workflow separation for PRs from forks --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1b3d5a..b11dd9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Split up `CI` workflow into two separate workflows for the comment posting for forks will work +- Split up `CI` workflow into two separate workflows for the comment posting to work for PRs from forks ## [1.2.1] - 2025-03-18 From f8f5e90fd037155c744f143c571ef8fa1e3fa98f Mon Sep 17 00:00:00 2001 From: Timothy Trowbridge Date: Thu, 3 Apr 2025 10:59:49 +0200 Subject: [PATCH 4/4] Fix formatting in CHANGELOG.md for CI workflow separation clarification --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b11dd9f..82a5241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Split up `CI` workflow into two separate workflows for the comment posting to work for PRs from forks +- Split up `CI` workflow into two separate workflows for the comment posting to work for PRs from forks. ## [1.2.1] - 2025-03-18