From 151621661b263768ff2e9b2b69b7ce5f83866c57 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 22 Jun 2023 22:35:44 +0000 Subject: [PATCH] Build/Test Tools: Store artefacts of failing E2E test runs. Modify the E2E workflow to store the screenshots and HTML files generated during failing tests as an artifact in the workflow. No artefact is stored for passing test runs. Props peterwilsoncc, isabel_brison. Fixes #58596. git-svn-id: https://develop.svn.wordpress.org/trunk@55991 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/end-to-end-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index f8c86f6791..ce9331e93d 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -110,6 +110,14 @@ jobs: - name: Run E2E tests run: npm run test:e2e + - name: Archive debug artifacts (screenshots, HTML snapshots) + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: always() + with: + name: failures-artifacts + path: artifacts + if-no-files-found: ignore + - name: Ensure version-controlled files are not modified or deleted run: git diff --exit-code