-
Notifications
You must be signed in to change notification settings - Fork 72
46 lines (43 loc) · 1.49 KB
/
Copy pathci.yml
File metadata and controls
46 lines (43 loc) · 1.49 KB
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
name: ci
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# windows-2022 ships VS 2022. windows-latest currently has VS 2026
# (18.x), which node-gyp 10/11 bundled with Node 22 reports as
# unknown version "undefined" and then fails the native rebuild.
os: [ubuntu-latest, macos-latest, windows-2022]
node: [22]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node }}
- name: Install and test
# bash so `&&` is a hard stop on Windows too (PowerShell would still
# run npm test after a failed rebuild).
shell: bash
run: npm ci && npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.x'
- name: Install gcovr
run: |
gcovr --version || pip install --upgrade gcovr
- name: Install dependencies
run: npm ci
# Fails the job when JS or native coverage drops below 95%.
- name: Coverage
run: npm run coverage