Run storybook tests on CI #832
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting & tests | |
on: [push] | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.16.1' | |
- name: Install dependencies ⚙️ | |
run: yarn | |
- name: Lint 👀 | |
run: yarn lint | |
- name: Test 🚀 | |
run: yarn test | |
- name: Build Storybook 📖 | |
run: yarn build-storybook | |
- name: Storybook Tests (axe-core) ♿️ | |
run: | | |
yarn storybook & | |
echo "wait for storybook to start" | |
until curl --output /dev/null --silent --head --fail http://localhost:6006; do | |
printf '.' | |
sleep 5 | |
done | |
yarn test-storybook |