11name : Run Tests
2-
2+ permissions :
3+ # Needed for npm Trusted Publishing
4+ id-token : write
5+ # Needed for semantic-release
6+ contents : write
7+ pull-requests : write
8+ issues : write
39on :
410 push :
511 branches :
@@ -11,76 +17,77 @@ jobs:
1117 audit :
1218 runs-on : ubuntu-latest
1319 steps :
14- - uses : actions/checkout@v2
15- - uses : actions/setup-node@v1
20+ - uses : actions/checkout@v4
21+ - uses : actions/setup-node@v4
1622 with :
17- node-version : 12
23+ node-version : 22
1824 registry-url : https://registry.npmjs.org/
1925 - run : npm ci
2026 - run : npm run audit
2127 unit :
2228 runs-on : ubuntu-latest
2329 steps :
24- - uses : actions/checkout@v2
25- - uses : actions/setup-node@v1
30+ - uses : actions/checkout@v4
31+ - uses : actions/setup-node@v4
2632 with :
27- node-version : 12
33+ node-version : 22
2834 registry-url : https://registry.npmjs.org/
2935 - run : npm ci
3036 - run : npm run unit
3137 coverage :
3238 runs-on : ubuntu-latest
3339 steps :
34- - uses : actions/checkout@v2
35- - uses : actions/setup-node@v1
40+ - uses : actions/checkout@v4
41+ - uses : actions/setup-node@v4
3642 with :
37- node-version : 12
43+ node-version : 22
3844 registry-url : https://registry.npmjs.org/
3945 - run : npm ci
4046 - run : npm run coverage
4147 format :
4248 runs-on : ubuntu-latest
4349 steps :
44- - uses : actions/checkout@v2
45- - uses : actions/setup-node@v1
50+ - uses : actions/checkout@v4
51+ - uses : actions/setup-node@v4
4652 with :
47- node-version : 12
53+ node-version : 22
4854 registry-url : https://registry.npmjs.org/
4955 - run : npm ci
5056 - run : npm run format:ci
5157 gitdiff :
5258 runs-on : ubuntu-latest
5359 steps :
54- - uses : actions/checkout@v2
55- - uses : actions/setup-node@v1
60+ - uses : actions/checkout@v4
61+ - uses : actions/setup-node@v4
5662 with :
57- node-version : 12
63+ node-version : 22
5864 registry-url : https://registry.npmjs.org/
5965 - run : npm ci
6066 - run : npm run gitdiff:ci
6167 lint :
6268 runs-on : ubuntu-latest
6369 steps :
64- - uses : actions/checkout@v2
65- - uses : actions/setup-node@v1
70+ - uses : actions/checkout@v4
71+ - uses : actions/setup-node@v4
6672 with :
67- node-version : 12
73+ node-version : 22
6874 registry-url : https://registry.npmjs.org/
6975 - run : npm ci
7076 - run : npm run lint
7177 lint-tests :
7278 runs-on : ubuntu-latest
7379 steps :
74- - uses : actions/checkout@v2
75- - uses : actions/setup-node@v1
80+ - uses : actions/checkout@v4
81+ - uses : actions/setup-node@v4
7682 with :
77- node-version : 12
83+ node-version : 22
7884 registry-url : https://registry.npmjs.org/
7985 - run : npm ci
8086 - run : npm run lint:tests
8187 release :
8288 if : github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
8389 runs-on : ubuntu-latest
90+ environment : publish-ecpair
8491 needs :
8592 - audit
8693 - unit
@@ -90,13 +97,15 @@ jobs:
9097 - lint
9198 - lint-tests
9299 steps :
93- - uses : actions/checkout@v3
94- - uses : actions/setup-node@v3
100+ - uses : actions/checkout@v4
101+ - uses : actions/setup-node@v4
95102 with :
96- node-version : 14
103+ node-version : 22
97104 cache : ' npm'
105+ - name : Ensure npm 11.5.1
106+ run : |
107+ npm install -g npm@11.5.1
98108 - run : npm ci
99109 - run : ./node_modules/.bin/semantic-release
100110 env :
101- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
102111 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments