From b3651f3fba24304ac5a8cfcf196c0bc70f345508 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 14 Jun 2024 07:59:26 +0200 Subject: [PATCH] upload playwright artifacts on test failure to help debug what went wrong --- .github/workflows/build.yml | 8 ++++++++ .../test/java/com/commafeed/e2e/PlaywrightTestBase.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 701e9b8d..5f0b2225 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,14 @@ jobs: name: commafeed.jar path: commafeed-server/target/commafeed.jar + - name: Upload Playwright artifacts + if: failure() + uses: actions/upload-artifact@v4 + with: + name: playwright-artifacts + path: | + **/target/playwright-artifacts/ + # Docker - name: Login to Container Registry uses: docker/login-action@v3 diff --git a/commafeed-server/src/test/java/com/commafeed/e2e/PlaywrightTestBase.java b/commafeed-server/src/test/java/com/commafeed/e2e/PlaywrightTestBase.java index eb2acdd4..a4d2ab4d 100644 --- a/commafeed-server/src/test/java/com/commafeed/e2e/PlaywrightTestBase.java +++ b/commafeed-server/src/test/java/com/commafeed/e2e/PlaywrightTestBase.java @@ -34,7 +34,7 @@ import com.microsoft.playwright.Tracing; * */ @ExtendWith(PlaywrightTestBase.SaveArtifactsOnTestFailed.class) -public class PlaywrightTestBase { +public abstract class PlaywrightTestBase { private static Playwright playwright; private static Browser browser;