Skip to content

Commit

Permalink
feat(github): a new github action for testing the storybook (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudmanson authored Nov 2, 2022
1 parent 55b1fcb commit 57507a3
Show file tree
Hide file tree
Showing 3 changed files with 2,103 additions and 30 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Storybook Tests
on: deployment_status
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.17"
- name: Install dependencies
run: yarn
- name: Run Storybook tests
run: yarn test-storybook
env:
TARGET_URL: "${{ github.event.deployment_status.target_url }}"
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@storybook/builder-webpack4": "^6.5.9",
"@storybook/manager-webpack4": "^6.5.9",
"@storybook/react": "^6.5.9",
"@storybook/test-runner": "^0.9.0",
"@storybook/testing-library": "^0.0.13",
"@storybook/testing-react": "^1.2.4",
"@storybook/theming": "^6.5.9",
Expand Down Expand Up @@ -99,6 +100,7 @@
"build-watch": "rollup -c -w",
"start": "start-storybook -p 6006",
"build-storybook": "build-storybook -o docs-build",
"test-storybook": "test-storybook",
"lint": "concurrently \"node_modules/.bin/eslint src/**/*.{ts,tsx} --quiet --fix\" \"node_modules/.bin/stylelint --fix '**/*.{js,ts,tsx,css}'\" \"npm run type-check\"",
"type-check": "tsc --noEmit",
"prepare": "husky install",
Expand Down
Loading

0 comments on commit 57507a3

Please sign in to comment.