From 7e7d0e86992cf2fcda76ccdd2a1c28e16d14704f Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Sun, 11 Dec 2022 21:33:19 -0300 Subject: [PATCH] Add reporter for all tests (#9395) --- .github/workflows/ci.yaml | 16 +++++++++++++--- .github/workflows/junit-reports.yaml | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 494477b81..0f21ccc4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ on: inputs: run_e2e: description: 'Force e2e to run' - required: true + required: false type: boolean permissions: @@ -73,6 +73,9 @@ jobs: name: Build runs-on: ubuntu-latest needs: changes + if: | + (needs.changes.outputs.go == 'true') || (needs.changes.outputs.charts == 'true') || ${{ inputs.run_e2e }} + steps: @@ -268,10 +271,10 @@ jobs: make kind-e2e-test - name: Uplaod e2e junit-reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: success() || failure() with: - name: e2e-test-reports + name: e2e-test-reports-${{ matrix.k8s }} path: 'test/junitreports/report*.xml' kubernetes-chroot: @@ -330,6 +333,13 @@ jobs: run: | kind get kubeconfig > $HOME/.kube/kind-config-kind make kind-e2e-test + + - name: Uplaod e2e junit-reports + uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: e2e-test-reports-chroot-${{ matrix.k8s }} + path: 'test/junitreports/report*.xml' test-image-build: diff --git a/.github/workflows/junit-reports.yaml b/.github/workflows/junit-reports.yaml index 21f2674a1..f02e68466 100644 --- a/.github/workflows/junit-reports.yaml +++ b/.github/workflows/junit-reports.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: dorny/test-reporter@v1 with: - artifact: e2e-test-reports - name: JEST Tests # Name of the check run which will be created + artifact: /e2e-test-reports-(.*)/ + name: JEST Tests $1 # Name of the check run which will be created path: 'report*.xml' # Path to test results (inside artifact .zip) reporter: jest-junit # Format of test results