From b4fca2a9ffc59193333a49e4a5f917b404d6cc68 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 09:48:38 +0200 Subject: [PATCH 1/6] Use test report generators without artifact opt --- .github/workflows/test-report.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 107c4a83..089682c4 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -18,12 +18,16 @@ jobs: runs-on: ubuntu-22.04 if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: dorny/test-reporter@v1 + - name: Download test results + uses: actions/download-artifact@v4 + with: + name: test-results + path: test-results + - uses: dorny/test-reporter@v1.8.0 id: test-results with: - artifact: test-results name: Mocha Tests - path: test-report.json + path: test-results/test-report.json reporter: mocha-json - name: Test Report Summary run: | From 2e207eebecc7cf3db7d678aa7757e3aaf9bafdd9 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 09:49:18 +0200 Subject: [PATCH 2/6] Use actions/upload-artifact v4 for uploading e2e test results --- .github/workflows/build-electron-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-electron-app.yml b/.github/workflows/build-electron-app.yml index 6f2cded9..64acd22c 100644 --- a/.github/workflows/build-electron-app.yml +++ b/.github/workflows/build-electron-app.yml @@ -214,7 +214,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Linux E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-e2e-test-results path: e2e-test-report.xml @@ -246,7 +246,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Win E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: win-e2e-test-results path: e2e-test-report.xml @@ -280,7 +280,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Mac E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mac-e2e-test-results path: e2e-test-report.xml From f7aa2dfda06b5a7187166ae65e429d13cf510198 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 09:51:13 +0200 Subject: [PATCH 3/6] Use actions/upload-artifact v4 for uploading test results --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acf4b350..1941df0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: run: ./scripts/setup.sh -u - name: Run tests run: npm test -- -- --reporter=json --reporter-option output=test-report.json - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() || failure() with: name: test-results From 4c08582382c0419b81cca16db00eef7f8ffd9342 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 09:53:34 +0200 Subject: [PATCH 4/6] Use e2e test report generators without artifact opt --- .github/workflows/e2e-test-report.yml | 30 +++++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-test-report.yml b/.github/workflows/e2e-test-report.yml index b353f0ad..4ae0855d 100644 --- a/.github/workflows/e2e-test-report.yml +++ b/.github/workflows/e2e-test-report.yml @@ -18,26 +18,38 @@ jobs: runs-on: ubuntu-22.04 if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: dorny/test-reporter@v1 + - name: Download Linux E2E test results + uses: actions/download-artifact@v4 + with: + name: linux-e2e-test-results + path: linux-e2e-test-results + - uses: dorny/test-reporter@v1.8.0 id: linux-e2e-test-results with: - artifact: linux-e2e-test-results name: Linux E2E Tests - path: e2e-test-report.xml + path: linux-e2e-test-results/e2e-test-report.xml reporter: jest-junit - - uses: dorny/test-reporter@v1 + - name: Download Win E2E test results + uses: actions/download-artifact@v4 + with: + name: win-e2e-test-results + path: win-e2e-test-results + - uses: dorny/test-reporter@v1.8.0 id: win-e2e-test-results with: - artifact: win-e2e-test-results name: Win E2E Tests - path: e2e-test-report.xml + path: win-e2e-test-results/e2e-test-report.xml reporter: jest-junit - - uses: dorny/test-reporter@v1 + - name: Download Mac E2E test results + uses: actions/download-artifact@v4 + with: + name: mac-e2e-test-results + path: mac-e2e-test-results + - uses: dorny/test-reporter@v1.8.0 id: mac-e2e-test-results with: - artifact: mac-e2e-test-results name: Mac E2E Tests - path: e2e-test-report.xml + path: mac-e2e-test-results/e2e-test-report.xml reporter: jest-junit - name: E2E Test Report Summary run: | From b27bfce9ce885a37313c8ef1b66bbeca91ab5080 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 11:44:43 +0200 Subject: [PATCH 5/6] Fix test result download permission --- .github/workflows/e2e-test-report.yml | 6 ++++++ .github/workflows/test-report.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/e2e-test-report.yml b/.github/workflows/e2e-test-report.yml index 4ae0855d..f40734a4 100644 --- a/.github/workflows/e2e-test-report.yml +++ b/.github/workflows/e2e-test-report.yml @@ -21,6 +21,8 @@ jobs: - name: Download Linux E2E test results uses: actions/download-artifact@v4 with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} name: linux-e2e-test-results path: linux-e2e-test-results - uses: dorny/test-reporter@v1.8.0 @@ -32,6 +34,8 @@ jobs: - name: Download Win E2E test results uses: actions/download-artifact@v4 with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} name: win-e2e-test-results path: win-e2e-test-results - uses: dorny/test-reporter@v1.8.0 @@ -43,6 +47,8 @@ jobs: - name: Download Mac E2E test results uses: actions/download-artifact@v4 with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} name: mac-e2e-test-results path: mac-e2e-test-results - uses: dorny/test-reporter@v1.8.0 diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 089682c4..6793bb81 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -21,6 +21,8 @@ jobs: - name: Download test results uses: actions/download-artifact@v4 with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} name: test-results path: test-results - uses: dorny/test-reporter@v1.8.0 From e21598accac384897f3c9cacea6be9f710840b30 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 12 Mar 2024 13:07:28 +0200 Subject: [PATCH 6/6] Add workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files --- .github/workflows/e2e-test-report.yml | 5 +++++ .github/workflows/test-report.yml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/e2e-test-report.yml b/.github/workflows/e2e-test-report.yml index f40734a4..7ce5edd3 100644 --- a/.github/workflows/e2e-test-report.yml +++ b/.github/workflows/e2e-test-report.yml @@ -31,6 +31,9 @@ jobs: name: Linux E2E Tests path: linux-e2e-test-results/e2e-test-report.xml reporter: jest-junit + # Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files' + # See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458 + max-annotations: 0 - name: Download Win E2E test results uses: actions/download-artifact@v4 with: @@ -44,6 +47,7 @@ jobs: name: Win E2E Tests path: win-e2e-test-results/e2e-test-report.xml reporter: jest-junit + max-annotations: 0 - name: Download Mac E2E test results uses: actions/download-artifact@v4 with: @@ -57,6 +61,7 @@ jobs: name: Mac E2E Tests path: mac-e2e-test-results/e2e-test-report.xml reporter: jest-junit + max-annotations: 0 - name: E2E Test Report Summary run: | echo "### E2E Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 6793bb81..bf11d9d5 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -31,6 +31,9 @@ jobs: name: Mocha Tests path: test-results/test-report.json reporter: mocha-json + # Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files' + # See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458 + max-annotations: 0 - name: Test Report Summary run: | echo "### Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY