Skip to content

Commit 97ea27b

Browse files
committed
ci: use package-lock.json file to enable consistent CI runs
1 parent 0daa479 commit 97ea27b

File tree

6 files changed

+6129
-16
lines changed

6 files changed

+6129
-16
lines changed

.github/workflows/tests-release.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
- uses: actions/setup-node@v3
2727
with:
2828
node-version: 20
29-
# install to create local package-lock.json but don't cache the files
30-
# also: no audit for dev dependencies
31-
- run: npm i --package-lock-only && npm audit --production
29+
- run: npm clean-install && npm audit --production
3230

3331
# STEP 2 - basic unit tests
3432

@@ -50,7 +48,7 @@ jobs:
5048
node-version: ${{ matrix.node }}
5149
cache: npm
5250
# for this workflow we also require npm audit to pass
53-
- run: npm i
51+
- run: npm clean-install
5452
- run: npm run test:coverage
5553

5654
# with the following action we enforce PRs to have a high coverage
@@ -97,7 +95,7 @@ jobs:
9795
# xxx: added bluebird as explicit dependency
9896
- run: |
9997
cd github/testing/express
100-
npm i
98+
npm install
10199
npm install https://github.com/node-oauth/node-oauth2-server.git#${{ github.ref_name }}
102100
npm run test
103101
@@ -112,7 +110,7 @@ jobs:
112110
with:
113111
node-version: 16
114112
registry-url: https://registry.npmjs.org/
115-
- run: npm i
113+
- run: npm clean-install
116114
- run: npm publish --dry-run
117115
env:
118116
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -130,7 +128,7 @@ jobs:
130128
# we always publish targeting the lowest supported node version
131129
node-version: 16
132130
registry-url: $registry-url(npm)
133-
- run: npm i
131+
- run: npm clean-install
134132
- run: npm publish --dry-run
135133
env:
136134
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
node-version: 20
2727
cache: npm
28-
- run: npm install
28+
- run: npm clean-install
2929
- run: npm run lint
3030

3131
unittest:
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
node-version: ${{ matrix.node }}
4646
cache: npm
47-
- run: npm i
47+
- run: npm clean-install
4848
- run: npm run test:coverage
4949

5050
# with the following action we enforce PRs to have a high coverage

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,3 @@ tramp
3939
# coverage
4040
coverage
4141
.nyc_output
42-
43-
package-lock.json
44-
yarn.lock

.npmignore

-3
This file was deleted.

.npmrc

-1
This file was deleted.

0 commit comments

Comments
 (0)