Skip to content

Commit c45e258

Browse files
authored
ci: add job for unit tests (#3)
1 parent a48606b commit c45e258

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
- '**'
1111

1212
jobs:
13-
precommit:
14-
name: Precommit checks
13+
lint_and_typecheck:
14+
name: Lint & Typecheck
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
@@ -27,3 +27,19 @@ jobs:
2727
run: npm run lint
2828
- name: Typecheck
2929
run: npm run typecheck
30+
31+
unit_tests:
32+
name: Unit Tests
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 18
41+
cache: npm
42+
- name: Install Packages
43+
run: npm ci
44+
- name: Run Tests
45+
run: npm run test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"deps:ci": "npm ci",
3838
"lint": "eslint .",
3939
"lint:fix": "npm run lint -- --fix",
40-
"prepare": "husky install",
40+
"prepare": "husky",
4141
"prepublishOnly": "npm run build",
4242
"test": "jest --passWithNoTests",
4343
"typecheck": "tsc --noEmit"

0 commit comments

Comments
 (0)