Skip to content

Commit 3d5c37f

Browse files
committed
Add unit tests to CI
1 parent b49fc51 commit 3d5c37f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/unit.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Unit tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
inputs:
10+
node-version:
11+
required: false
12+
default: "22.x"
13+
14+
jobs:
15+
unit-tests:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
path: repo
21+
22+
- name: Use Node.js ${{ inputs.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ inputs.node-version }}
26+
27+
- name: Install project
28+
run: |
29+
npm ci
30+
31+
- name: Run tests
32+
run: |
33+
npm run test
34+
35+

0 commit comments

Comments
 (0)