From 3cf945d1b2b9cea7029f156baf0cd4d6935f2c68 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Wed, 7 Aug 2024 16:34:44 +0200 Subject: [PATCH] Update e2e test file upload step Signed-off-by: Mirjam Aulbach --- .github/workflows/end-to-end-tests.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/end-to-end-tests.yaml b/.github/workflows/end-to-end-tests.yaml index 0b0713d952..19e3540071 100644 --- a/.github/workflows/end-to-end-tests.yaml +++ b/.github/workflows/end-to-end-tests.yaml @@ -87,6 +87,7 @@ jobs: # be immediately ready to accept connections, so the retry makes sure # we're giving it (hopefully) enough time to be ready. - name: Make sure Klaw is reachable + id: klaw-build-reachable run: | retries=5 # Number of retries interval=5 # Initial retry interval in seconds @@ -125,16 +126,16 @@ jobs: run: pnpm playwright install --with-deps chromium - name: Run Playwright tests - id: playwright-test-run + id: working-directory: ./e2e run: BASE_URL=http://${{ steps.containerIp.outputs.CONTAINER_IP }}:9097 pnpm __test - name: Upload Playwright artifacts uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - # Upload whether steps before where a failure, but only when the playwright tests did run + # Upload only when klaw-build-reachable was successful. # This way we make sure we don't attempt to upload files that are not there, bc. # for example the build has failed. - if: ${{ always() && steps.playwright-test-run.status == 'completed' }} + if: ${{ always() && steps.klaw-build-reachable.status == 'success' }} with: name: playwright-report path: playwright-report/