-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (42 loc) · 1.01 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build & Test
on:
workflow_dispatch:
pull_request:
paths:
- 'src/**'
- 'libcompiler.**'
- 'package.json'
- 'package-lock.json'
push:
branches:
- main
- 'release/*'
paths:
- 'src/**'
- 'libcompiler.**'
- 'package.json'
- 'package-lock.json'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20]
env:
# for private repo access
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- run: npm install
- run: npm run build
# for private repo access
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/
- run: npm run test
- run: npm run lint