45
45
run : cargo fmt -- --check
46
46
- name : Clippy
47
47
run : cargo clippy
48
+
49
+ test :
50
+ name : Test
51
+ runs-on : ubuntu-latest
52
+ steps :
53
+ - uses : actions/checkout@v5
54
+ - name : Install Rust toolchain
55
+ uses : dtolnay/rust-toolchain@stable
56
+ with :
57
+ components : llvm-tools-preview
58
+ - name : Install cargo-llvm-cov
59
+ uses : taiki-e/install-action@v2
60
+ with :
61
+ tool : cargo-llvm-cov
62
+ - name : Cache cargo registry
63
+ uses : actions/cache@v4
64
+ with :
65
+ path : |
66
+ ~/.cargo/registry
67
+ ~/.cargo/git
68
+ target
69
+ key : ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
70
+ restore-keys : |
71
+ ${{ runner.os }}-cargo-test-
72
+ - name : Run tests with coverage
73
+ run : cargo llvm-cov --verbose --workspace --lcov --output-path=lcov.info
74
+ - name : Upload coverage to Coveralls
75
+ env :
76
+ COVERALLS_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
77
+ uses :
coverallsapp/[email protected]
78
+ with :
79
+ github-token : ${{ secrets.GITHUB_TOKEN }}
80
+ path-to-lcov : lcov.info
81
+
48
82
build :
49
83
strategy :
50
84
fail-fast : false
@@ -159,15 +193,6 @@ jobs:
159
193
shell : bash
160
194
- name : Test bindings
161
195
run : yarn test
162
- - name : Upload coverage report
163
- if : ${{ matrix.settings.host == 'macos-latest' && matrix.node == '22' }}
164
- env :
165
- COVERALLS_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
166
- uses :
coverallsapp/[email protected]
167
- with :
168
- github-token : ${{ secrets.GITHUB_TOKEN }}
169
- path-to-lcov : coverage/lcov.info
170
- parallel : true
171
196
172
197
test-linux-binding :
173
198
name : Test ${{ matrix.target }} - node@${{ matrix.node }}
@@ -235,18 +260,7 @@ jobs:
235
260
image : ${{ steps.docker.outputs.IMAGE }}
236
261
options : ' -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}'
237
262
run : yarn test
238
- coverage :
239
- name : Coverage
240
- runs-on : ubuntu-latest
241
- needs : [test-macOS-windows-binding, test-linux-binding]
242
- steps :
243
- - name : Upload coverage report
244
- env :
245
- COVERALLS_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
246
- uses :
coverallsapp/[email protected]
247
- with :
248
- github-token : ${{ secrets.GITHUB_TOKEN }}
249
- parallel-finished : true
263
+
250
264
publish :
251
265
name : Publish
252
266
runs-on : ubuntu-latest
@@ -255,6 +269,7 @@ jobs:
255
269
id-token : write
256
270
needs :
257
271
- lint
272
+ - test
258
273
- test-macOS-windows-binding
259
274
- test-linux-binding
260
275
steps :
0 commit comments