Skip to content

Commit 1ce8dae

Browse files
committed
add ci
1 parent 54a8125 commit 1ce8dae

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'CI'
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'dev' ]
6+
pull_request:
7+
branches: [ 'master', 'dev' ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 'lts/*'
22+
23+
- name: Cache Node.js modules
24+
uses: actions/cache@v3
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-node-
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run tests
35+
run: npm test

0 commit comments

Comments
 (0)