@@ -22,13 +22,15 @@ jobs:
22
22
runs-on : ubuntu-latest
23
23
24
24
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
27
31
with :
28
32
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
32
34
33
35
# STEP 2 - basic unit tests
34
36
@@ -41,29 +43,25 @@ jobs:
41
43
matrix :
42
44
node : [16, 18, 20]
43
45
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
46
51
47
52
- name : Setup node ${{ matrix.node }}
48
- uses : actions/setup-node@v3
53
+ uses : actions/setup-node@v4
49
54
with :
50
55
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
59
57
# for this workflow we also require npm audit to pass
60
- - run : npm i
58
+ - run : npm clean-install
61
59
- run : npm run test:coverage
62
60
63
61
# with the following action we enforce PRs to have a high coverage
64
62
# and ensure, changes are tested well enough so that coverage won't fail
65
63
- name : check coverage
66
- uses : VeryGoodOpenSource/very_good_coverage@v1.2.0
64
+ uses : VeryGoodOpenSource/very_good_coverage@v3
67
65
with :
68
66
path : ' ./coverage/lcov.info'
69
67
min_coverage : 95
@@ -82,36 +80,34 @@ jobs:
82
80
node : [16, 18, 20] # TODO get running for node 16+
83
81
steps :
84
82
# 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
87
88
88
89
# 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
91
92
with :
93
+ persist-credentials : false
94
+ show-progress : false
92
95
repository : node-oauth/express-oauth-server
93
96
path : github/testing/express
94
97
95
98
- name : Setup node ${{ matrix.node }}
96
- uses : actions/setup-node@v3
99
+ uses : actions/setup-node@v4
97
100
with :
98
101
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
107
103
108
104
# in order to test the adapter we need to use the current checkout
109
105
# and install it as local dependency
110
106
# we just cloned and install it as local dependency
111
107
# xxx: added bluebird as explicit dependency
112
108
- run : |
113
109
cd github/testing/express
114
- npm i
110
+ npm install
115
111
npm install https://github.com/node-oauth/node-oauth2-server.git#${{ github.ref_name }}
116
112
npm run test
117
113
@@ -121,12 +117,16 @@ jobs:
121
117
runs-on : ubuntu-latest
122
118
needs : [integrationtests]
123
119
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
126
126
with :
127
127
node-version : 16
128
128
registry-url : https://registry.npmjs.org/
129
- - run : npm i
129
+ - run : npm clean-install
130
130
- run : npm publish --dry-run
131
131
env :
132
132
NODE_AUTH_TOKEN : ${{secrets.npm_token}}
@@ -138,13 +138,17 @@ jobs:
138
138
contents : read
139
139
packages : write
140
140
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
143
147
with :
144
148
# we always publish targeting the lowest supported node version
145
149
node-version : 16
146
150
registry-url : $registry-url(npm)
147
- - run : npm i
151
+ - run : npm clean-install
148
152
- run : npm publish --dry-run
149
153
env :
150
154
NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments