Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit Tests

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install project dependencies
run: pnpm install --frozen-lockfile

- name: Run Unit Tests
run: pnpm test
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"publint": "publint",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build",
"storybook:publish": "npm run storybook:build && touch ./storybook-static/.nojekyll"
"storybook:publish": "npm run storybook:build && touch ./storybook-static/.nojekyll",
"test": "vitest run"
},
"lint-staged": {
"*.{css,js,md,ts,jsx,tsx,ts}": "prettier --write"
Expand Down Expand Up @@ -106,7 +107,8 @@
"storybook": "^7.3.1",
"tailwindcss": "^3.3.3",
"tsup": "^7.2.0",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^1.0.1"
},
"peerDependencies": {
"@types/react": "^18.0.0",
Expand Down
Loading