-
-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (57 loc) · 1.57 KB
/
pretest.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
59
60
61
62
63
64
65
66
67
name: 'Tests: pretest/posttest'
on: workflow_call
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
pretest:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
egress-policy: audit
allowed-endpoints: >
github.com:443
raw.githubusercontent.com:443
nodejs.org:443
iojs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v4
with:
show-progress: false
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
- run: npm run pretest
posttest:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
egress-policy: audit
allowed-endpoints: >
github.com:443
raw.githubusercontent.com:443
nodejs.org:443
iojs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v4
with:
show-progress: false
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
- run: npm run posttest
engines:
runs-on: ubuntu-latest
steps:
- uses: ljharb/actions/node/engines@main
pack:
runs-on: ubuntu-latest
steps:
- uses: ljharb/actions/node/pack@main