From 4f5407d22b7b1a94c6d94cd511f7269261fbb04f Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sun, 9 Oct 2022 11:16:57 +0200 Subject: [PATCH 1/3] CI: run gnucomment also if pipeline fails --- .github/workflows/GnuComment.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/GnuComment.yml b/.github/workflows/GnuComment.yml index fd73520e6..fee3303fb 100644 --- a/.github/workflows/GnuComment.yml +++ b/.github/workflows/GnuComment.yml @@ -1,7 +1,5 @@ -name: Comment on GNU test results on the PR +name: GnuComment -# read-write repo token -# access to secrets on: workflow_run: workflows: ["GnuTests"] @@ -9,11 +7,10 @@ on: - completed jobs: - upload: + post-comment: runs-on: ubuntu-latest if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' + github.event.workflow_run.event == 'pull_request' steps: - name: 'Download artifact' uses: actions/github-script@v3.1.0 From 0f1638545c46c7d4371390ad04436de7a050f738 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sun, 9 Oct 2022 11:22:53 +0200 Subject: [PATCH 2/3] CI: Fix up JS syntax in GnuComment --- .github/workflows/GnuComment.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/GnuComment.yml b/.github/workflows/GnuComment.yml index fee3303fb..f74c022ed 100644 --- a/.github/workflows/GnuComment.yml +++ b/.github/workflows/GnuComment.yml @@ -16,25 +16,25 @@ jobs: uses: actions/github-script@v3.1.0 with: script: | - # List all artifacts from GnuTests + // List all artifacts from GnuTests var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{ github.event.workflow_run.id }}, }); - # Download the "comment" artifact, which contains a PR number (NR) and result.txt + // Download the "comment" artifact, which contains a PR number (NR) and result.txt var matchArtifact = artifacts.data.artifacts.filter((artifact) => { return artifact.name == "comment" })[0]; var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', }); var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/comment.zip', Buffer.from(download.data)); + fs.writeFileSync('${{ github.workspace }}/comment.zip', Buffer.from(download.data)); - run: unzip comment.zip - name: 'Comment on PR' From f749a129aa03c822b79ad3d823636a61a5bce05f Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sat, 8 Oct 2022 23:53:48 +0200 Subject: [PATCH 3/3] ci: upload comparison log regardless of previous result --- .github/workflows/GnuTests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 4db4220c9..086174654 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -244,6 +244,7 @@ jobs: fi if test -n "${have_new_failures}" ; then exit -1 ; fi - name: Upload comparison log (for GnuComment workflow) + if: success() || failure() # run regardless of prior step success/failure uses: actions/upload-artifact@v3 with: name: comment