From 9f56a541655a1a73d77eb22d24ec5f5e3e6a9af7 Mon Sep 17 00:00:00 2001 From: Manuel Dublanc <19774382+manud99@users.noreply.github.com> Date: Thu, 2 May 2024 19:01:03 +0200 Subject: [PATCH 1/2] Add test report to the GitHub actions workflow. --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78e863051..0f7122f55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,11 @@ on: [push, pull_request, workflow_dispatch] env: RELEASE_DIR: tmp_release +permissions: + contents: read + actions: read + checks: write + jobs: test-and-assemble: runs-on: ubuntu-latest @@ -24,7 +29,7 @@ jobs: # Checkout Silicon (note: all checkouts delete the contents of their working directory) - name: Checkout Silicon - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true @@ -45,7 +50,7 @@ jobs: # Cache path is relative to the directory in which sbt is invoked run: echo "SBT_OPTS=-Dsbt.global.base=sbt-cache/.sbtboot -Dsbt.boot.directory=sbt-cache/.boot -Dsbt.ivy.home=sbt-cache/.ivy" >> $GITHUB_ENV - name: Cache sbt - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | sbt-cache/.sbtboot @@ -68,7 +73,7 @@ jobs: cp target/scala-2.13/silicon.jar . - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: test-and-assemble path: | @@ -77,6 +82,26 @@ jobs: retention-days: 14 if-no-files-found: error + - name: Upload test reports + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test reports + path: | + target/test-reports/*.xml + retention-days: 14 + if-no-files-found: error + + - name: Test Report + uses: phoenix-actions/test-reporting@v8 + if: ${{ !cancelled() }} + with: + name: "Silicon Test Report" + path: "target/test-reports/*.xml" + reporter: java-junit + list-suites: failed + list-tests: failed + release-snapshot: needs: test-and-assemble # Only for regular commits to master branch (no pull requests, no tagging) @@ -85,12 +110,12 @@ jobs: steps: # Checkout Silicon (deletes content of working directory) - name: Checkout Silicon - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: Download artifacts from job test-and-assemble - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: test-and-assemble From efdb7d38fdf926161010b3c36a746256052a274e Mon Sep 17 00:00:00 2001 From: Manuel Dublanc <19774382+manud99@users.noreply.github.com> Date: Mon, 13 May 2024 10:01:06 +0200 Subject: [PATCH 2/2] Update phoenix-actions/test-reporting container to v15. --- .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 0f7122f55..6d94a78fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,7 @@ jobs: if-no-files-found: error - name: Test Report - uses: phoenix-actions/test-reporting@v8 + uses: phoenix-actions/test-reporting@v15 if: ${{ !cancelled() }} with: name: "Silicon Test Report"