Skip to content

Commit 2e6e045

Browse files
add ci github action file (#159)
1 parent ba02f38 commit 2e6e045

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [18.x]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- name: Get Yarn cache directory
24+
id: yarn-cache-dir-path
25+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
26+
27+
- name: Use Yarn cache
28+
uses: actions/cache@v4
29+
id: yarn-cache
30+
with:
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
33+
34+
- name: Install dependencies
35+
run: yarn install --prefer-offline --frozen-lockfile
36+
37+
- name: Test
38+
run: yarn run test
39+
40+
- name: Lint
41+
run: yarn run lint
42+
43+
- name: Build
44+
run: yarn run build

0 commit comments

Comments
 (0)