44- pull_request
55- push
66
7+ permissions :
8+ contents : read
9+
710jobs :
811 test :
912 runs-on : ubuntu-latest
@@ -79,33 +82,34 @@ jobs:
7982
8083 - name : Node.js 8.x
8184 node-version : " 8.17"
82- 85+ 8386
8487 - name : Node.js 9.x
8588 node-version : " 9.11"
86- 89+ 8790
8891 - name : Node.js 10.x
8992 node-version : " 10.24"
90- 93+ 9194
9295 - name : Node.js 11.x
9396 node-version : " 11.15"
94- 97+ 9598
9699 - name : Node.js 12.x
97100 node-version : " 12.22"
98- 101+ 99102
100103 - name : Node.js 13.x
101104 node-version : " 13.14"
102- 105+ 103106
104107 - name : Node.js 14.x
105108 node-version : " 14.21"
106109
107110 - name : Node.js 15.x
108- node-version : " 15.14"
111+ node-version : " 15.14"
112+ 109113
110114 - name : Node.js 16.x
111115 node-version : " 16.20"
@@ -126,7 +130,7 @@ jobs:
126130 node-version : " 21.6"
127131
128132 steps :
129- - uses : actions/checkout@v4
133+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
130134
131135 - name : Install Node.js ${{ matrix.node-version }}
132136 shell : bash -eo pipefail -l {0}
@@ -185,7 +189,7 @@ jobs:
185189 run : |
186190 if npm -ps ls nyc | grep -q nyc; then
187191 npm run test-ci
188- cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
192+ cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"
189193 else
190194 npm test
191195 fi
@@ -198,40 +202,42 @@ jobs:
198202 if : steps.list_env.outputs.nyc != ''
199203 run : |
200204 if [[ -d ./coverage ]]; then
201- mv ./coverage "./${{ matrix.name }}"
205+ mv ./coverage "./${{ matrix.node-version }}"
202206 mkdir ./coverage
203- mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
207+ mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"
204208 fi
205209
206210 - name : Upload code coverage
207- uses : actions/upload-artifact@v3
211+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
208212 if : steps.list_env.outputs.nyc != ''
209213 with :
210- name : coverage
211- path : ./coverage
214+ name : coverage-${{ matrix.node-version }}
215+ path : " ./coverage/${{ matrix.node-version }} "
212216 retention-days : 1
213217
214218 coverage :
219+ permissions :
220+ checks : write # for coverallsapp/github-action to create new checks
221+ contents : read # for actions/checkout to fetch code
215222 needs : test
216223 runs-on : ubuntu-latest
217224 steps :
218- - uses : actions/checkout@v4
225+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
219226
220227 - name : Install lcov
221228 shell : bash
222229 run : sudo apt-get -y install lcov
223230
224231 - name : Collect coverage reports
225- uses : actions/download-artifact@v3
232+ uses : actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
226233 with :
227- name : coverage
228234 path : ./coverage
229235
230236 - name : Merge coverage reports
231237 shell : bash
232238 run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
233239
234240 - name : Upload coverage report
235- uses : coverallsapp/github-action@master
241+ uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # master
236242 with :
237243 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments