From 90570820d29474e69a52b80d81c8e6fe31e2dd01 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Fri, 17 Mar 2023 15:36:29 +0100 Subject: [PATCH 1/3] e2e: add "checks: write" permission for junit reports --- .github/workflows/e2e-test-daily.yml | 1 + .github/workflows/e2e-test-manual.yml | 1 + .github/workflows/e2e-test-weekly.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/e2e-test-daily.yml b/.github/workflows/e2e-test-daily.yml index b02781e790..835fe0d75e 100644 --- a/.github/workflows/e2e-test-daily.yml +++ b/.github/workflows/e2e-test-daily.yml @@ -48,6 +48,7 @@ jobs: runs-on: ubuntu-22.04 permissions: id-token: write + checks: write contents: read needs: [find-latest-image] steps: diff --git a/.github/workflows/e2e-test-manual.yml b/.github/workflows/e2e-test-manual.yml index b04c120fd7..4ee49882bc 100644 --- a/.github/workflows/e2e-test-manual.yml +++ b/.github/workflows/e2e-test-manual.yml @@ -187,6 +187,7 @@ jobs: runs-on: ${{ inputs.runner }} permissions: id-token: write + checks: write contents: read needs: [find-latest-image] if: always() && !cancelled() diff --git a/.github/workflows/e2e-test-weekly.yml b/.github/workflows/e2e-test-weekly.yml index c0435b6289..3a5d71ff22 100644 --- a/.github/workflows/e2e-test-weekly.yml +++ b/.github/workflows/e2e-test-weekly.yml @@ -96,6 +96,7 @@ jobs: runs-on: ubuntu-22.04 permissions: id-token: write + checks: write contents: read needs: [find-latest-image] steps: From 941163b9786ad7bc51488e6f27404f5109832571 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Fri, 17 Mar 2023 16:28:11 +0100 Subject: [PATCH 2/3] e2e: only use junit for full tests --- .github/actions/e2e_sonobuoy/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/e2e_sonobuoy/action.yml b/.github/actions/e2e_sonobuoy/action.yml index 847e15ec60..0c1c1c675d 100644 --- a/.github/actions/e2e_sonobuoy/action.yml +++ b/.github/actions/e2e_sonobuoy/action.yml @@ -48,8 +48,9 @@ runs: name: "sonobuoy_logs_${{ inputs.cloudProvider}}.tar.gz" path: "*_sonobuoy_*.tar.gz" + # Only works on "sonobuoy full" tests (e2e plugin) - name: Publish test results - if: (!env.ACT) + if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e') uses: mikepenz/action-junit-report@4fa23552acda20a6a1d44f16224a90efbeb6c5f1 # v3.7.5 with: report_paths: "**/junit_01.xml" From d8bc453d02251db20e74adbaacade4f772b161e8 Mon Sep 17 00:00:00 2001 From: Nils Hanke Date: Mon, 20 Mar 2023 13:32:58 +0100 Subject: [PATCH 3/3] e2e: extract sonobuoy results to access junit results --- .github/actions/e2e_sonobuoy/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/e2e_sonobuoy/action.yml b/.github/actions/e2e_sonobuoy/action.yml index 0c1c1c675d..ab3da56cbd 100644 --- a/.github/actions/e2e_sonobuoy/action.yml +++ b/.github/actions/e2e_sonobuoy/action.yml @@ -49,6 +49,11 @@ runs: path: "*_sonobuoy_*.tar.gz" # Only works on "sonobuoy full" tests (e2e plugin) + - name: Extract test results + if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e') + shell: bash + run: tar -xf *_sonobuoy_*.tar.gz + - name: Publish test results if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e') uses: mikepenz/action-junit-report@4fa23552acda20a6a1d44f16224a90efbeb6c5f1 # v3.7.5