-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (56 loc) · 1.48 KB
/
build.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: build
on:
push:
branches:
- main
- develop
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18', '20']
steps:
- uses: actions/checkout@v4
ref: ${{ github.event.pull_request.head.ref }}
- name: Check for devDependencies bump pull request
run: |
message=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
if [ echo "$message" | grep -q -F "chore(deps-dev):" ] && [ ${{ matrix.node }} != "20" ]; then
echo "::set-output name=skip_ci::true"
else
echo "::set-output name=skip_ci::false"
fi
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup node lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup node lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest