Skip to content

Commit

Permalink
ci: separate test workflows and add codecov [skip release]
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jun 24, 2022
1 parent 640c820 commit d206bb4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Tests-extended

on: [push]

Expand All @@ -16,15 +16,6 @@ jobs:
- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Run jest tests
run: |
yarn test
- name: Run test runner (default config)
run: |
yarn build
yarn test-storybook:ci
- name: Run test runner (story store v7)
run: |
yarn build
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on: [push]

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

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Run jest tests
run: |
yarn test --coverage
- name: Run test runner
run: |
yarn build
yarn test-storybook:ci-coverage
- name: Generate code coverage
uses: codecov/codecov-action@v2
with:
verbose: true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"test-storybook:no-cache": "yarn test-storybook --no-cache",
"test-storybook:json": "yarn test-storybook --stories-json",
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && yarn test-storybook\"",
"test-storybook:ci-coverage": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && yarn test-storybook --coverage\"",
"test-storybook:ci-json": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && yarn test-storybook:json\"",
"generate-dynamic-stories": "node scripts/generate-dynamic-stories.js"
},
Expand Down

0 comments on commit d206bb4

Please sign in to comment.