Skip to content

Commit

Permalink
ci(storybook): make tests mandatory (#1543)
Browse files Browse the repository at this point in the history
Co-authored-by: Kezhik Kyzyl-ool <[email protected]>
  • Loading branch information
Kyzyl-ool and Kezhik Kyzyl-ool authored Apr 23, 2024
1 parent 6dc2720 commit 41cc3a5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/pr-storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: PR Storybook Tests

on:
workflow_run:
workflows: ['PR Preview Deploy']
types:
- completed
pull_request:

jobs:
tests:
Expand All @@ -19,7 +16,12 @@ jobs:
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Storybook Tests
- name: Build Storybook Static
run: npm run build-storybook
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 7007 --silent" \
"npx wait-on $PR_PREVIEW_URL && npm run test-storybook"
env:
PR_PREVIEW_URL: "https://preview.gravity-ui.com/uikit/${{github.event.pull_request.number}}"
run: npm run test-storybook
PR_PREVIEW_URL: http://127.0.0.1:7007

0 comments on commit 41cc3a5

Please sign in to comment.