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:
run: yarn run: yarn
- name: Install Playwright Browsers - name: Install Playwright Browsers
run: yarn playwright install --with-deps run: yarn playwright install --with-deps
- name: Run Storybook tests - uses: nick-fields/retry@v2
run: yarn test-storybook:ci with:
name: Run Storybook tests
timeout_minutes: 5
max_attempts: 9
command: yarn test
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: always() if: always()
with: with:

3
.storybook/test-runner.ts

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

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

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

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

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

Loading…
Cancel
Save