14
14
paths-ignore :
15
15
- ' *.md'
16
16
17
+ permissions :
18
+ contents : read
19
+
17
20
# Cancel in progress workflows
18
21
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
19
22
concurrency :
@@ -26,13 +29,13 @@ jobs:
26
29
runs-on : ubuntu-latest
27
30
steps :
28
31
- uses : actions/checkout@v4
29
- - name : Setup Node.js {{ matrix.node-version }}
32
+ - name : Setup Node.js
30
33
uses : actions/setup-node@v4
31
34
with :
32
35
node-version : ' lts/*'
33
36
34
37
- name : Install dependencies
35
- run : npm install --ignore-scripts --only =dev
38
+ run : npm install --ignore-scripts --inlcude =dev
36
39
37
40
- name : Run lint
38
41
run : npm run lint
@@ -73,44 +76,39 @@ jobs:
73
76
74
77
- name : Run tests
75
78
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
85
80
86
81
- name : Upload code coverage
87
- uses : actions/upload-artifact@v3
82
+ uses : actions/upload-artifact@v4
88
83
with :
89
- name : coverage
90
- path : ./coverage
84
+ name : coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
85
+ path : ./coverage/lcov.info
91
86
retention-days : 1
92
87
93
88
coverage :
94
89
needs : test
95
90
runs-on : ubuntu-latest
91
+ permissions :
92
+ contents : read
93
+ checks : write
96
94
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