Skip to content

Commit fcf63a5

Browse files
feat: add infrastructure for tests (#39)
1 parent b166712 commit fcf63a5

File tree

5 files changed

+792
-2
lines changed

5 files changed

+792
-2
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: "20"
26+
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v2
29+
with:
30+
version: latest
31+
32+
- name: Install project dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Run Unit Tests
36+
run: pnpm test

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
"publint": "publint",
7575
"storybook": "storybook dev -p 6006",
7676
"storybook:build": "storybook build",
77-
"storybook:publish": "npm run storybook:build && touch ./storybook-static/.nojekyll"
77+
"storybook:publish": "npm run storybook:build && touch ./storybook-static/.nojekyll",
78+
"test": "vitest run"
7879
},
7980
"lint-staged": {
8081
"*.{css,js,md,ts,jsx,tsx,ts}": "prettier --write"
@@ -106,7 +107,8 @@
106107
"storybook": "^7.3.1",
107108
"tailwindcss": "^3.3.3",
108109
"tsup": "^7.2.0",
109-
"typescript": "^5.1.6"
110+
"typescript": "^5.1.6",
111+
"vitest": "^1.0.1"
110112
},
111113
"peerDependencies": {
112114
"@types/react": "^18.0.0",

0 commit comments

Comments
 (0)