From dbce354429af7a9193f7284b00260649602ade1e Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 22 Dec 2023 00:00:00 +0000 Subject: [PATCH] build: mitigate intermittent storybook tests in ci removed skipping tests using tags as this isn't functional. cannot apply tags to stories made using addon-svelte-csf. therefore cannot skip intermittently passing tests. instead all tests will be rerun upto 9 times if any tests fail. A better approach would be rerunning individual tests but this would require a PR for test-runner. --- .github/workflows/playwright.yml | 8 ++++++-- .storybook/test-runner.ts | 3 --- src/lib/components/RepoSummaryCard.stories.svelte | 5 +---- src/lib/components/ReposSummaryList.stories.svelte | 2 -- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 157edc6..04544db 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -17,8 +17,12 @@ jobs: run: yarn - name: Install Playwright Browsers run: yarn playwright install --with-deps - - name: Run Storybook tests - run: yarn test-storybook:ci + - uses: nick-fields/retry@v2 + with: + name: Run Storybook tests + timeout_minutes: 5 + max_attempts: 9 + command: yarn test - uses: actions/upload-artifact@v3 if: always() with: diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index fa58bfd..b8677e0 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -26,9 +26,6 @@ const config: TestRunnerConfig = { failureThreshold: 0.002, }); }, - tags: { - skip: ["intermittent-test-success"], - }, }; export default config; diff --git a/src/lib/components/RepoSummaryCard.stories.svelte b/src/lib/components/RepoSummaryCard.stories.svelte index ee17bb5..ca99748 100644 --- a/src/lib/components/RepoSummaryCard.stories.svelte +++ b/src/lib/components/RepoSummaryCard.stories.svelte @@ -23,7 +23,4 @@ - + diff --git a/src/lib/components/ReposSummaryList.stories.svelte b/src/lib/components/ReposSummaryList.stories.svelte index c6c7a71..83daabf 100644 --- a/src/lib/components/ReposSummaryList.stories.svelte +++ b/src/lib/components/ReposSummaryList.stories.svelte @@ -43,7 +43,6 @@ title: "Latest", repos: [], loading: true, - tags: ["intermittent-test-success"], }} /> @@ -53,6 +52,5 @@ title: "Latest", repos: [vectors.Short, vectors.Long], loading: true, - tags: ["intermittent-test-success"], }} />