1414 paths-ignore :
1515 - ' *.md'
1616
17+ permissions :
18+ contents : read
19+
1720# Cancel in progress workflows
1821# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
1922concurrency :
@@ -26,13 +29,13 @@ jobs:
2629 runs-on : ubuntu-latest
2730 steps :
2831 - uses : actions/checkout@v4
29- - name : Setup Node.js {{ matrix.node-version }}
32+ - name : Setup Node.js
3033 uses : actions/setup-node@v4
3134 with :
3235 node-version : ' lts/*'
3336
3437 - name : Install dependencies
35- run : npm install --ignore-scripts --only =dev
38+ run : npm install --ignore-scripts --inlcude =dev
3639
3740 - name : Run lint
3841 run : npm run lint
@@ -73,44 +76,39 @@ jobs:
7376
7477 - name : Run tests
7578 shell : bash
76- run : |
77- npm run test-ci
78- cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"
79-
80- - name : Collect code coverage
81- run : |
82- mv ./coverage "./${{ matrix.node-version }}"
83- mkdir ./coverage
84- mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"
79+ run : npm run test-ci
8580
8681 - name : Upload code coverage
87- uses : actions/upload-artifact@v3
82+ uses : actions/upload-artifact@v4
8883 with :
89- name : coverage
90- path : ./coverage
84+ name : coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
85+ path : ./coverage/lcov.info
9186 retention-days : 1
9287
9388 coverage :
9489 needs : test
9590 runs-on : ubuntu-latest
91+ permissions :
92+ contents : read
93+ checks : write
9694 steps :
97- - uses : actions/checkout@v4
98-
99- - name : Install lcov
100- shell : bash
101- run : sudo apt-get -y install lcov
102-
103- - name : Collect coverage reports
104- uses : actions/download-artifact@v3
105- with :
106- name : coverage
107- path : ./ coverage
108-
109- - name : Merge coverage reports
110- shell : bash
111- run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage /lcov.info
112-
113- - name : Upload coverage report
114- uses : coverallsapp/github-action@master
115- with :
116- github-token : ${{ secrets.GITHUB_TOKEN }}
95+ - uses : actions/checkout@v4
96+
97+ - name : Install lcov
98+ shell : bash
99+ run : sudo apt-get -y install lcov
100+
101+ - name : Collect coverage reports
102+ uses : actions/download-artifact@v4
103+ with :
104+ path : ./ coverage
105+ pattern : coverage-node-*
106+
107+ - name : Merge coverage reports
108+ shell : bash
109+ run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
110+
111+ - name : Upload coverage report
112+ uses : coverallsapp/github-action@v2
113+ with :
114+ file : ./lcov.info
0 commit comments