Skip to content

Commit

Permalink
wip: run storybook6 tests by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshah98 committed Oct 25, 2023
1 parent 0076956 commit a5dc440
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node: [14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions-ecosystem/action-regex-match@v2
Expand All @@ -29,6 +29,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: ./prepare-storybook-v6-tests.sh
- uses: actions/cache@v3
with:
path: node_modules
Expand Down
66 changes: 66 additions & 0 deletions packageV6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "@percy/storybook",
"version": "4.3.7",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/percy/percy-storybook.git"
},
"engine": {
"node": ">=16"
},
"files": [
"bin",
"dist"
],
"bin": {
"percy-storybook": "./bin/percy-storybook.cjs"
},
"main": "./dist/index.js",
"exports": "./dist/index.js",
"type": "module",
"scripts": {
"build": "babel src --out-dir dist",
"clean": "git clean -Xdf -e !node_modules -e !node_modules/**",
"lint": "eslint --ignore-path .gitignore .",
"readme": "percy-cli-readme",
"pretest": "build-storybook --config-dir=./test/.storybook --output-dir=./test/.storybook-build --loglevel error",
"test": "yarn test:env jasmine --config=./test/jasmine.json",
"test:env": "cross-env NODE_ENV=test NODE_OPTIONS='--loader=./test/loader.js'",
"test:coverage": "nyc yarn test"
},
"@percy/cli": {
"commands": [
"./dist/storybook.js"
]
},
"dependencies": {
"@percy/cli-command": "^1.24.0",
"cross-spawn": "^7.0.3",
"qs": "^6.11.0"
},
"devDependencies": {
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.19.1",
"@babel/eslint-plugin": "^7.19.1",
"@babel/preset-env": "^7.22.9",
"@storybook/react": "^6.5.13",
"babel-eslint": "^10.0.3",
"babel-plugin-istanbul": "^6.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.51.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"jasmine": "^4.5.0",
"jasmine-spec-reporter": "^7.0.0",
"mock-require": "^3.0.3",
"nock": "^13.2.9",
"nyc": "^15.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
5 changes: 5 additions & 0 deletions prepare-storybook-v6-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# move package and storybook configs
mv ./packageV6.json ./package.json
mv ./test/.storybook/mainV6.js ./test/.storybook/main.js

0 comments on commit a5dc440

Please sign in to comment.