-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.36 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
name: Build
on: workflow_call
jobs:
combinations:
name: ${{ matrix.os }}, Node.js ${{matrix.node}}
# git push --tags does not create any commits so should not trigger a new
# workflow. There are no ways to skip workflows, so we skip jobs instead
if: toJson(github.event.commits) != '[]'
strategy:
# Test on Windows/Mac/Linux using latest Node.js.
# Also test on Linux with older Node.js versions.
# We do not run each possible combination to make CI faster.
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node: [20]
include:
- os: ubuntu-latest
node: 16.17.0
fail-fast: false
runs-on: ${{ matrix.os }}
# We do not use @actions/cache because restoring/saving cache currently
# takes more time than the time saved on `npm ci`
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npx gulp build
- name: Linting
run: npx gulp check
- name: Types
run: npx gulp type
- name: Tests
run: npx gulp unit
- name: Upload test coverage
run: npx gulp uploadCoverage