1313 paths-ignore :
1414 - ' *.md'
1515
16+ permissions :
17+ contents : read
18+
1619# Cancel in progress workflows
1720# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
1821concurrency :
@@ -25,14 +28,13 @@ jobs:
2528 runs-on : ubuntu-latest
2629 steps :
2730 - uses : actions/checkout@v4
28- - name : Setup Node.js {{ matrix.node-version }}
31+ - name : Setup Node.js
2932 uses : actions/setup-node@v4
3033 with :
3134 node-version : ' lts/*'
32- persist-credentials : false
3335
3436 - name : Install dependencies
35- run : npm install --ignore-scripts --only =dev
37+ run : npm install --ignore-scripts --include =dev
3638
3739 - name : Run lint
3840 run : npm run lint
@@ -148,44 +150,39 @@ jobs:
148150
149151 - name : Run tests
150152 shell : bash
151- run : |
152- npm run test-ci
153- cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"
154-
155- - name : Collect code coverage
156- run : |
157- mv ./coverage "./${{ matrix.node-version }}"
158- mkdir ./coverage
159- mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"
153+ run : npm run test-ci
160154
161155 - name : Upload code coverage
162- uses : actions/upload-artifact@v3
156+ uses : actions/upload-artifact@v4
163157 with :
164- name : coverage
165- path : ./coverage
158+ name : coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
159+ path : ./coverage/lcov.info
166160 retention-days : 1
167161
168162 coverage :
169163 needs : test
170164 runs-on : ubuntu-latest
165+ permissions :
166+ contents : read
167+ checks : write
171168 steps :
172- - uses : actions/checkout@v4
173-
174- - name : Install lcov
175- shell : bash
176- run : sudo apt-get -y install lcov
177-
178- - name : Collect coverage reports
179- uses : actions/download-artifact@v3
180- with :
181- name : coverage
182- path : ./ coverage
183-
184- - name : Merge coverage reports
185- shell : bash
186- run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage /lcov.info
187-
188- - name : Upload coverage report
189- uses : coverallsapp/github-action@master
190- with :
191- github-token : ${{ secrets.GITHUB_TOKEN }}
169+ - uses : actions/checkout@v4
170+
171+ - name : Install lcov
172+ shell : bash
173+ run : sudo apt-get -y install lcov
174+
175+ - name : Collect coverage reports
176+ uses : actions/download-artifact@v4
177+ with :
178+ path : ./ coverage
179+ pattern : coverage-node-*
180+
181+ - name : Merge coverage reports
182+ shell : bash
183+ run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
184+
185+ - name : Upload coverage report
186+ uses : coverallsapp/github-action@v2
187+ with :
188+ file : ./lcov.info
0 commit comments