-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.55 KB
/
Copy pathtest.yml
File metadata and controls
46 lines (42 loc) · 1.55 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 — Linux · macOS · Windows
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
- name: Verify JavaScript syntax correctness
# Globbed on purpose (AUD-R3-07): a hardcoded list silently loses every
# module added after it was written. bash exists on all three runners.
shell: bash
run: |
for f in install.mjs lib/*.mjs test/*.mjs; do node --check "$f"; done
- name: Run smoke tests
run: node test/run-tests.mjs
# Coverage floor for the installer (c8/V8).
# Floors sit a few points under the measured numbers so environment noise
# doesn't flake the gate; raise them as coverage improves.
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
- name: Measure coverage and enforce the floor
run: >
npx --yes c8 --include "lib/**/*.mjs" --include install.mjs
--check-coverage --lines 83 --branches 73 --functions 90 --statements 83
--reporter=text node test/run-tests.mjs