Skip to content

Commit

Permalink
add VTA and CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Nov 22, 2024
1 parent 2f3b0c6 commit 75c2c5f
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4

- name: Install dependencies
run: yarn install

# Install Playwright browsers so Vitest browser mode can run story tests
- name: Install playwright dependencies
run: yarn exec playwright install chromium --with-deps

- name: Run tests
run: |
yarn test-storybook
3 changes: 2 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const config: StorybookConfig = {
staticDirs: ['../public'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'@storybook/experimental-addon-test',
'@chromatic-com/storybook',
'@storybook/addon-a11y',
],
framework: {
name: '@storybook/react-vite',
Expand Down
1 change: 0 additions & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ initialize({

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react-redux": "^9.0.4"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@storybook/addon-a11y": "^8.4.0",
"@storybook/addon-essentials": "^8.4.0",
"@storybook/blocks": "^8.4.0",
Expand Down
67 changes: 64 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,21 @@ __metadata:
languageName: node
linkType: hard

"@chromatic-com/storybook@npm:^3.2.2":
version: 3.2.2
resolution: "@chromatic-com/storybook@npm:3.2.2"
dependencies:
chromatic: "npm:^11.15.0"
filesize: "npm:^10.0.12"
jsonfile: "npm:^6.1.0"
react-confetti: "npm:^6.1.0"
strip-ansi: "npm:^7.1.0"
peerDependencies:
storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
checksum: 10c0/7b8da1ddb399c804337ff28a28594b548392b7bead52f66615b98e201cdeb4d31184b9e355791ba5d0d8cfdd2bea7d38355ecd0058f26f4790f9a887107bde0f
languageName: node
linkType: hard

"@esbuild/aix-ppc64@npm:0.21.5":
version: 0.21.5
resolution: "@esbuild/aix-ppc64@npm:0.21.5"
Expand Down Expand Up @@ -4178,7 +4193,7 @@ __metadata:
languageName: node
linkType: hard

"chromatic@npm:^11.18.1":
"chromatic@npm:^11.15.0, chromatic@npm:^11.18.1":
version: 11.18.1
resolution: "chromatic@npm:11.18.1"
peerDependencies:
Expand Down Expand Up @@ -5457,6 +5472,13 @@ __metadata:
languageName: node
linkType: hard

"filesize@npm:^10.0.12":
version: 10.1.6
resolution: "filesize@npm:10.1.6"
checksum: 10c0/9a196d64da4e947b8c0d294be09a3dfa7a634434a1fc5fb3465f1c9acc1237ea0363f245ba6e24477ea612754d942bc964d86e0e500905a72e9e0e17ae1bbdbc
languageName: node
linkType: hard

"fill-range@npm:^4.0.0":
version: 4.0.0
resolution: "fill-range@npm:4.0.0"
Expand Down Expand Up @@ -5839,7 +5861,7 @@ __metadata:
languageName: node
linkType: hard

"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
version: 4.2.11
resolution: "graceful-fs@npm:4.2.11"
checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2
Expand Down Expand Up @@ -6122,6 +6144,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "intro-storybook-react-template@workspace:."
dependencies:
"@chromatic-com/storybook": "npm:^3.2.2"
"@reduxjs/toolkit": "npm:^2.0.1"
"@storybook/addon-a11y": "npm:^8.4.0"
"@storybook/addon-essentials": "npm:^8.4.0"
Expand Down Expand Up @@ -6850,6 +6873,19 @@ __metadata:
languageName: node
linkType: hard

"jsonfile@npm:^6.1.0":
version: 6.1.0
resolution: "jsonfile@npm:6.1.0"
dependencies:
graceful-fs: "npm:^4.1.6"
universalify: "npm:^2.0.0"
dependenciesMeta:
graceful-fs:
optional: true
checksum: 10c0/4f95b5e8a5622b1e9e8f33c96b7ef3158122f595998114d1e7f03985649ea99cb3cd99ce1ed1831ae94c8c8543ab45ebd044207612f31a56fd08462140e46865
languageName: node
linkType: hard

"jsx-ast-utils@npm:^2.4.1 || ^3.0.0":
version: 3.3.5
resolution: "jsx-ast-utils@npm:3.3.5"
Expand Down Expand Up @@ -8075,6 +8111,17 @@ __metadata:
languageName: node
linkType: hard

"react-confetti@npm:^6.1.0":
version: 6.1.0
resolution: "react-confetti@npm:6.1.0"
dependencies:
tween-functions: "npm:^1.2.0"
peerDependencies:
react: ^16.3.0 || ^17.0.1 || ^18.0.0
checksum: 10c0/5b4eb23eef564695f6db1d25b294ed31d5fa21ff4092c6a38e641f85cd10e3e0b50014366e3ac0f7cf772e73faaecd14614e5b11a5531336fa769dda8068ab59
languageName: node
linkType: hard

"react-docgen-typescript@npm:^2.2.2":
version: 2.2.2
resolution: "react-docgen-typescript@npm:2.2.2"
Expand Down Expand Up @@ -9195,7 +9242,7 @@ __metadata:
languageName: node
linkType: hard

"strip-ansi@npm:^7.0.1":
"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0":
version: 7.1.0
resolution: "strip-ansi@npm:7.1.0"
dependencies:
Expand Down Expand Up @@ -9536,6 +9583,13 @@ __metadata:
languageName: node
linkType: hard

"tween-functions@npm:^1.2.0":
version: 1.2.0
resolution: "tween-functions@npm:1.2.0"
checksum: 10c0/7e59295b8b0ee4132ed2fe335f56a9db5c87056dad6b6fd3011be72239fd20398003ddb4403bc98ad9f5c94468890830f64016edbbde35581faf95b32cda8305
languageName: node
linkType: hard

"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
version: 0.4.0
resolution: "type-check@npm:0.4.0"
Expand Down Expand Up @@ -9732,6 +9786,13 @@ __metadata:
languageName: node
linkType: hard

"universalify@npm:^2.0.0":
version: 2.0.1
resolution: "universalify@npm:2.0.1"
checksum: 10c0/73e8ee3809041ca8b818efb141801a1004e3fc0002727f1531f4de613ea281b494a40909596dae4a042a4fb6cd385af5d4db2e137b1362e0e91384b828effd3a
languageName: node
linkType: hard

"unplugin@npm:^1.3.1":
version: 1.5.1
resolution: "unplugin@npm:1.5.1"
Expand Down

0 comments on commit 75c2c5f

Please sign in to comment.