-
-
Notifications
You must be signed in to change notification settings - Fork 205
93 lines (74 loc) · 2.58 KB
/
Copy pathtests.yml
File metadata and controls
93 lines (74 loc) · 2.58 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: 'Tests'
on:
pull_request:
push:
branches: [ 'main' ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }}, Node ${{ matrix.node-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
node-version: [ '20.x', '22.x', '24.x' ]
include:
# A darwin leg is what covers the iOS-specific suites - they are gated
# on the platform and never execute anywhere else. One version is
# enough for that; 24 is the active LTS.
- os: macos-latest
node-version: '24.x'
steps:
- name: Harden the runner (Audit all outbound calls)
# only supported on the Ubuntu runners
if: runner.os == 'Linux'
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
# nothing here needs git auth after checkout, and npm test runs
# repository code
persist-credentials: false
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci --ignore-scripts
- name: Test
run: npm test
doctor:
name: Doctor (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# No darwin leg: unlike the CLI suites, these stub the platform through
# a fake HostInfo rather than probing it, so a second OS runs identical
# assertions.
node-version: [ '20.x', '22.x', '24.x' ]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: packages/doctor/package-lock.json
- name: Install
working-directory: packages/doctor
run: npm ci
- name: Test
working-directory: packages/doctor
run: npm test