1111 paths-ignore :
1212 - ' *.md'
1313 pull_request :
14- paths-ignore :
15- - ' *.md'
14+ workflow_dispatch :
15+
16+ permissions :
17+ contents : read
1618
1719# Cancel in progress workflows
1820# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
@@ -25,15 +27,16 @@ jobs:
2527 name : Lint
2628 runs-on : ubuntu-latest
2729 steps :
28- - uses : actions/checkout@v4
29- - name : Setup Node.js {{ matrix.node-version }}
30- uses : actions/setup-node@v4
30+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3131 with :
32- node-version : ' lts/*'
3332 persist-credentials : false
33+ - name : Setup Node.js
34+ uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
35+ with :
36+ node-version : ' lts/*'
3437
3538 - name : Install dependencies
36- run : npm install --ignore-scripts --only =dev
39+ run : npm install --ignore-scripts --include =dev
3740
3841 - name : Run lint
3942 run : npm run lint
@@ -43,19 +46,19 @@ jobs:
4346 fail-fast : false
4447 matrix :
4548 os : [ubuntu-latest, windows-latest]
46- node-version : [18, 19, 20, 21, 22, 23]
49+ node-version : [18, 19, 20, 21, 22, 23, 24, 25 ]
4750 # Node.js release schedule: https://nodejs.org/en/about/releases/
4851
4952 name : Node.js ${{ matrix.node-version }} - ${{matrix.os}}
5053
5154 runs-on : ${{ matrix.os }}
5255 steps :
53- - uses : actions/checkout@v4
56+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5457 with :
5558 persist-credentials : false
5659
5760 - name : Setup Node.js ${{ matrix.node-version }}
58- uses : actions/setup-node@v4
61+ uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
5962 with :
6063 node-version : ${{ matrix.node-version }}
6164
@@ -74,44 +77,41 @@ jobs:
7477
7578 - name : Run tests
7679 shell : bash
77- run : |
78- npm run test-ci
79- cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"
80-
81- - name : Collect code coverage
82- run : |
83- mv ./coverage "./${{ matrix.node-version }}"
84- mkdir ./coverage
85- mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"
80+ run : npm run test-ci
8681
8782 - name : Upload code coverage
88- uses : actions/upload-artifact@v3
83+ uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
8984 with :
90- name : coverage
91- path : ./coverage
85+ name : coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
86+ path : ./coverage/lcov.info
9287 retention-days : 1
9388
9489 coverage :
9590 needs : test
9691 runs-on : ubuntu-latest
92+ permissions :
93+ contents : read
94+ checks : write
9795 steps :
98- - uses : actions/checkout@v4
99-
100- - name : Install lcov
101- shell : bash
102- run : sudo apt-get -y install lcov
103-
104- - name : Collect coverage reports
105- uses : actions/download-artifact@v3
106- with :
107- name : coverage
108- path : ./coverage
109-
110- - name : Merge coverage reports
111- shell : bash
112- run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
113-
114- - name : Upload coverage report
115- uses : coverallsapp/github-action@master
116- with :
117- github-token : ${{ secrets.GITHUB_TOKEN }}
96+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
97+ with :
98+ persist-credentials : false
99+
100+ - name : Install lcov
101+ shell : bash
102+ run : sudo apt-get -y install lcov
103+
104+ - name : Collect coverage reports
105+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
106+ with :
107+ path : ./coverage
108+ pattern : coverage-node-*
109+
110+ - name : Merge coverage reports
111+ shell : bash
112+ run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
113+
114+ - name : Upload coverage report
115+ uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
116+ with :
117+ file : ./lcov.info
0 commit comments