Skip to content

Commit

Permalink
test: run storybook tests before gh publish (#1756)
Browse files Browse the repository at this point in the history
* test: fix storybook test runner

* test: install playwright

* test: run storybook tests before publishing

* style: remove whitespace
  • Loading branch information
hkfb authored Nov 6, 2023
1 parent 7ee1749 commit 776101f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ jobs:
- name: 📚 Build Storybook
run: npm run build-storybook

- name: Serve Storybook and run tests
env:
PORT: 8080
HOST: 127.0.0.1
run: |
npm install concurrently http-server wait-on
npx playwright install
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port $PORT -a $HOST" \
"npx wait-on http://$HOST:$PORT/ && npm run storybook:test -- --ci --url http://$HOST:$PORT/"
- name: 📚 Update Storybook
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
Expand All @@ -108,14 +119,3 @@ jobs:
git commit -m "Update Github Pages"
git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
fi
- name: Serve Storybook and run tests
env:
PORT: 8080
HOST: 127.0.0.1
run: |
npm install concurrently http-server wait-on
npx playwright install
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port $PORT -a $HOST" \
"npx wait-on http://$HOST:$PORT/ && npm run storybook:test -- --ci --url http://$HOST:$PORT/"

0 comments on commit 776101f

Please sign in to comment.