Browse Source

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.
master
DanConwayDev 2 years ago
parent
commit
dbce354429
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 8
      .github/workflows/playwright.yml
  2. 3
      .storybook/test-runner.ts
  3. 5
      src/lib/components/RepoSummaryCard.stories.svelte
  4. 2
      src/lib/components/ReposSummaryList.stories.svelte

8
.github/workflows/playwright.yml

@ -17,8 +17,12 @@ jobs: @@ -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:

3
.storybook/test-runner.ts

@ -26,9 +26,6 @@ const config: TestRunnerConfig = { @@ -26,9 +26,6 @@ const config: TestRunnerConfig = {
failureThreshold: 0.002,
});
},
tags: {
skip: ["intermittent-test-success"],
},
};
export default config;

5
src/lib/components/RepoSummaryCard.stories.svelte

@ -23,7 +23,4 @@ @@ -23,7 +23,4 @@
<Story name="No Details" args={{}} />
<Story
name="loading"
args={{ loading: true, tags: ["intermittent-test-success"] }}
/>
<Story name="loading" args={{ loading: true }} />

2
src/lib/components/ReposSummaryList.stories.svelte

@ -43,7 +43,6 @@ @@ -43,7 +43,6 @@
title: "Latest",
repos: [],
loading: true,
tags: ["intermittent-test-success"],
}}
/>
@ -53,6 +52,5 @@ @@ -53,6 +52,5 @@
title: "Latest",
repos: [vectors.Short, vectors.Long],
loading: true,
tags: ["intermittent-test-success"],
}}
/>

Loading…
Cancel
Save