Skip to content

Commit

Permalink
feat: install storybook test runner and add corresponding github work…
Browse files Browse the repository at this point in the history
…flow (#418)

* feat: install storybook test runner and add corresponding github workflow

* chore: remove unnecessary storybook test runner config file

* feat: update readme to include testing instructions

* feat: add vite dependency for ci
  • Loading branch information
ergusto authored Apr 5, 2024
1 parent 31e63f4 commit 396d0e7
Show file tree
Hide file tree
Showing 4 changed files with 1,789 additions and 75 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand All @@ -14,11 +14,20 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
- run: |
npm ci
npm run lint
npm test
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: npm run build-storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && yarn test-storybook"
automerge:
name: Merge dependabot's PRs
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ module.exports = {
import '@nearform/quantum/dist/global.css'
import { Button } from '@nearform/quantum'
```

## Tests

To run tests for the project, run:

```js
npm run test
```

To run Storybook tests for the project, run:


```js
npm run test-storybook
```
Loading

0 comments on commit 396d0e7

Please sign in to comment.