Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,39 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: webiny/action-conventional-commits@v1.1.0

storybook-functional-tests:
name: Storybook Functional Tests
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3

- name: Install
uses: ./.github/composite-actions/install

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Build Storybook
run: pnpm storybook:build

- name: Start Storybook server and run tests
run: |
npx http-server ./storybook-static -p 6006 --silent &
SERVER_PID=$!
# Wait for server to be ready
for i in {1..30}; do
if curl -f http://localhost:6006 > /dev/null 2>&1; then
break
fi
sleep 1
done
# Run tests
pnpm test-storybook
TEST_EXIT=$?
# Cleanup
kill $SERVER_PID 2>/dev/null || true
exit $TEST_EXIT
env:
CI: true
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: 'storybook:build'
exitOnceUploaded: true
exitZeroOnChanges: true
autoAcceptChanges: false

- name: Build package
run: pnpm build
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@mui/material": "^5.10.16",
"@playwright/test": "^1.27.1",
"@playwright/test": "^1.57.0",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
Expand Down
Loading