@@ -22,13 +22,15 @@ jobs:
2222 runs-on : ubuntu-latest
2323
2424 steps :
25- - uses : actions/checkout@v3
26- - uses : actions/setup-node@v3
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+ with :
28+ persist-credentials : false
29+ show-progress : false
30+ - uses : actions/setup-node@v4
2731 with :
2832 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
33+ - run : npm clean-install && npm audit --production
3234
3335 # STEP 2 - basic unit tests
3436
@@ -41,29 +43,25 @@ jobs:
4143 matrix :
4244 node : [16, 18, 20]
4345 steps :
44- - name : Checkout ${{ matrix.node }}
45- uses : actions/checkout@v3
46+ - name : Checkout repository
47+ uses : actions/checkout@v4
48+ with :
49+ persist-credentials : false
50+ show-progress : false
4651
4752 - name : Setup node ${{ matrix.node }}
48- uses : actions/setup-node@v3
53+ uses : actions/setup-node@v4
4954 with :
5055 node-version : ${{ matrix.node }}
51-
52- - name : Cache dependencies ${{ matrix.node }}
53- uses : actions/cache@v3
54- with :
55- path : ~/.npm
56- key : ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
57- restore-keys : |
58- ${{ runner.os }}-node-${{ matrix.node }}
56+ cache : npm
5957 # for this workflow we also require npm audit to pass
60- - run : npm i
58+ - run : npm clean-install
6159 - run : npm run test:coverage
6260
6361 # with the following action we enforce PRs to have a high coverage
6462 # and ensure, changes are tested well enough so that coverage won't fail
6563 - name : check coverage
66- uses : VeryGoodOpenSource/very_good_coverage@v1.2.0
64+ uses : VeryGoodOpenSource/very_good_coverage@v3
6765 with :
6866 path : ' ./coverage/lcov.info'
6967 min_coverage : 95
@@ -82,36 +80,34 @@ jobs:
8280 node : [16, 18, 20] # TODO get running for node 16+
8381 steps :
8482 # checkout this repo
85- - name : Checkout ${{ matrix.node }}
86- uses : actions/checkout@v3
83+ - name : Checkout repository
84+ uses : actions/checkout@v4
85+ with :
86+ persist-credentials : false
87+ show-progress : false
8788
8889 # checkout express-adapter repo
89- - name : Checkout express-adapter ${{ matrix.node }}
90- uses : actions/checkout@v3
90+ - name : Checkout express-adapter
91+ uses : actions/checkout@v4
9192 with :
93+ persist-credentials : false
94+ show-progress : false
9295 repository : node-oauth/express-oauth-server
9396 path : github/testing/express
9497
9598 - name : Setup node ${{ matrix.node }}
96- uses : actions/setup-node@v3
99+ uses : actions/setup-node@v4
97100 with :
98101 node-version : ${{ matrix.node }}
99-
100- - name : Cache dependencies ${{ matrix.node }}
101- uses : actions/cache@v3
102- with :
103- path : ~/.npm
104- key : ${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server-${{ hashFiles('github/testing/express/**/package-lock.json') }}
105- restore-keys : |
106- ${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server
102+ cache : npm
107103
108104 # in order to test the adapter we need to use the current checkout
109105 # and install it as local dependency
110106 # we just cloned and install it as local dependency
111107 # xxx: added bluebird as explicit dependency
112108 - run : |
113109 cd github/testing/express
114- npm i
110+ npm install
115111 npm install https://github.com/node-oauth/node-oauth2-server.git#${{ github.ref_name }}
116112 npm run test
117113
@@ -121,12 +117,16 @@ jobs:
121117 runs-on : ubuntu-latest
122118 needs : [integrationtests]
123119 steps :
124- - uses : actions/checkout@v3
125- - uses : actions/setup-node@v3
120+ - name : Checkout repository
121+ uses : actions/checkout@v4
122+ with :
123+ persist-credentials : false
124+ show-progress : false
125+ - uses : actions/setup-node@v4
126126 with :
127127 node-version : 16
128128 registry-url : https://registry.npmjs.org/
129- - run : npm i
129+ - run : npm clean-install
130130 - run : npm publish --dry-run
131131 env :
132132 NODE_AUTH_TOKEN : ${{secrets.npm_token}}
@@ -138,13 +138,17 @@ jobs:
138138 contents : read
139139 packages : write
140140 steps :
141- - uses : actions/checkout@v3
142- - uses : actions/setup-node@v3
141+ - name : Checkout repository
142+ uses : actions/checkout@v4
143+ with :
144+ persist-credentials : false
145+ show-progress : false
146+ - uses : actions/setup-node@v4
143147 with :
144148 # we always publish targeting the lowest supported node version
145149 node-version : 16
146150 registry-url : $registry-url(npm)
147- - run : npm i
151+ - run : npm clean-install
148152 - run : npm publish --dry-run
149153 env :
150154 NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments