Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook Test #12

Merged
merged 3 commits into from
Aug 29, 2024
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
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,36 @@ jobs:
run: yarn install
- name: Run tests
run: yarn test -- --ci --coverage
storybook:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
package: [{ name: 'svelte', port: 6006 }, { name: 'vue', port: 6007 }]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v4
id: yarn-cache
with:
path: .yarn/cache
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-yarn-
- name: Install Dependencies
run: |
yarn install
yarn dlx playwright install --with-deps chromium
- name: Build
run: yarn build
- name: Run tests
run: |
cd packages/${{ matrix.package.name }}
yarn dlx concurrently -k -s first -n "STORYBOOK,TEST" -c "magenta,blue" \
"yarn storybook" \
"yarn dlx wait-on tcp:${{ matrix.package.port }} && yarn test-storybook --url http://localhost:${{ matrix.package.port }}"
lint:
runs-on: ubuntu-20.04
steps:
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dev": "rollup --config --bundleConfigAsCjs --watch",
"test": "node --experimental-vm-modules $(yarn bin jest)",
"storybook": "storybook dev -p 6006 --no-open",
"storybook-test": "test-storybook --url http://localhost:6006",
"build-storybook": "storybook build"
},
"dependencies": {
Expand All @@ -39,6 +40,7 @@
"@storybook/svelte": "^8.1.1",
"@storybook/svelte-vite": "^8.1.1",
"@storybook/test": "^8.1.1",
"@storybook/test-runner": "0.16.0",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@swc/core": "^1.7.11",
"@swc/jest": "^0.2.36",
Expand Down
2 changes: 2 additions & 0 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dev": "rollup --config --bundleConfigAsCjs --watch",
"test": "jest",
"storybook": "storybook dev -p 6007 --no-open",
"storybook-test": "test-storybook --url http://localhost:6007",
"build-storybook": "storybook build"
},
"dependencies": {
Expand All @@ -38,6 +39,7 @@
"@storybook/addon-links": "^8.1.1",
"@storybook/blocks": "^8.1.1",
"@storybook/test": "^8.1.1",
"@storybook/test-runner": "0.16.0",
"@storybook/vue3": "^8.1.1",
"@storybook/vue3-vite": "^8.1.1",
"@swc/core": "^1.7.11",
Expand Down
Loading