Skip to content

Commit 22a34c9

Browse files
committed
ci: 👷 add GitHub workflow
1 parent 63e1817 commit 22a34c9

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/unit-test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Tests: Unit'
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
unit_tests:
7+
name: Run unit tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: pnpm/action-setup@v2.2.4
11+
with:
12+
version: 6.0.2
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
- name: Install pnpm
16+
run: pnpm i
17+
- name: Build
18+
run: pnpm run build
19+
- name: Test
20+
run: pnpm run test:ci
21+
env:
22+
PUBLIC_FATHOM_ID: ${{ secrets.PUBLIC_FATHOM_ID }}
23+
PUBLIC_FATHOM_URL: ${{ secrets.PUBLIC_FATHOM_URL }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"contributors:add": "all-contributors add",
3131
"contributors:generate": "all-contributors generate",
3232
"test:unit": "vitest",
33-
"test:ui": "vitest --ui"
33+
"test:ui": "vitest --ui",
34+
"test:ci": "vitest run"
3435
},
3536
"husky": {
3637
"hooks": {

0 commit comments

Comments
 (0)