Skip to content

Commit

Permalink
test: update test scripts to use coverage in storybook directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Nov 27, 2022
1 parent 2f05311 commit bdc2849
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
directory: ./docs/storybook/coverage
3 changes: 2 additions & 1 deletion docs/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"license": "MIT",
"scripts": {
"storybook": "rm -rf ./node_modules/.cache && start-storybook -p 6006 --ci",
"storybook:build": "build-storybook"
"storybook:build": "build-storybook",
"test": "rm -rf ./coverage && test-storybook"
},
"dependencies": {
"google-maps-react": "^2.0.6",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"start": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"pnpm run dev\" \"pnpm run type:check --watch\"",
"build": "pnpm run type:check && NODE_ENV=production tsup",
"release": "pnpm run build && np --no-2fa",
"test": "pnpm --filter @this/storybook exec test-storybook",
"test:coverage": "rm -rf ./coverage && pnpm run test --coverage && pnpm nyc report --reporter=lcov -t ./coverage/storybook --report-dir ./coverage/storybook",
"test": "pnpm --filter @this/storybook run test",
"test:coverage": "pnpm run test --coverage && pnpm nyc report --reporter=lcov -t ./docs/storybook/coverage/storybook --report-dir ./docs/storybook/coverage/storybook",
"test:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm run --filter @this/storybook storybook:build --quiet && pnpm http-server ./docs/storybook/storybook-static -p 6006 --silent\" \"pnpm wait-port 6006 && pnpm run test:coverage\"",
"type:check": "tsc --noEmit",
"lint": "concurrently -k -s first -n \"eslint,prettier\" -c \"green,magenta\" \"pnpm run lint:eslint\" \"pnpm run lint:prettier\"",
Expand Down

0 comments on commit bdc2849

Please sign in to comment.