@@ -14,15 +14,23 @@ jobs:
1414 name : Check & Test
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v4
17+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
18+ with :
19+ persist-credentials : false
1820
1921 - name : Install Rust toolchain
20- uses : dtolnay/rust-toolchain@stable
22+ uses : dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
2123 with :
24+ toolchain : stable
2225 components : clippy, rustfmt
2326
27+ - name : Install cargo-nextest
28+ uses : taiki-e/install-action@f5b277aa8941a90c16bc1cd6ab9363e0502b7d31
29+ with :
30+ tool : nextest
31+
2432 - name : Cache cargo registry & build
25- uses : actions/cache@v4
33+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
2634 with :
2735 path : |
2836 ~/.cargo/registry
@@ -39,23 +47,23 @@ jobs:
3947 run : cargo clippy -p gobby-core --all-targets -- -D warnings
4048
4149 - name : Test (gobby-core)
42- run : cargo test -p gobby-core
50+ run : cargo nextest run --profile ci -p gobby-core
4351
4452 - name : Clippy (gobby-core, ai)
4553 run : cargo clippy -p gobby-core --features ai --all-targets -- -D warnings
4654
4755 - name : Test (gobby-core, ai)
48- run : cargo test -p gobby-core --features ai
56+ run : cargo nextest run --profile ci -p gobby-core --features ai
4957
5058 # ghook: full clippy + tests
5159 - name : Clippy (ghook)
5260 run : cargo clippy -p gobby-hooks --all-targets -- -D warnings
5361
5462 - name : Test (ghook)
55- run : cargo test -p gobby-hooks
63+ run : cargo nextest run --profile ci -p gobby-hooks
5664
5765 - name : Test (ghook, no default features)
58- run : cargo test -p gobby-hooks --no-default-features
66+ run : cargo nextest run --profile ci -p gobby-hooks --no-default-features
5967
6068 - name : Clippy (ghook, no default features)
6169 run : cargo clippy -p gobby-hooks --all-targets --no-default-features -- -D warnings
@@ -65,37 +73,92 @@ jobs:
6573 run : cargo clippy -p gobby-squeeze -- -D warnings
6674
6775 - name : Test (gsqz)
68- run : cargo test -p gobby-squeeze
76+ run : cargo nextest run --profile ci -p gobby-squeeze
6977
7078 # gloc: full clippy + tests
7179 - name : Clippy (gloc)
7280 run : cargo clippy -p gobby-local -- -D warnings
7381
7482 - name : Test (gloc)
75- run : cargo test -p gobby-local
83+ run : cargo nextest run --profile ci -p gobby-local
7684
7785 # gwiki: default checks include documents/pdfium; no-default-features covers degraded storage path
7886 - name : Clippy (gwiki)
7987 run : cargo clippy -p gobby-wiki --all-targets -- -D warnings
8088
8189 - name : Test (gwiki)
82- run : cargo test -p gobby-wiki
90+ run : cargo nextest run --profile ci -p gobby-wiki
8391
8492 - name : Clippy (gwiki, no default features)
8593 run : cargo clippy -p gobby-wiki --all-targets --no-default-features -- -D warnings
8694
8795 - name : Test (gwiki, no default features)
88- run : cargo test -p gobby-wiki --no-default-features
96+ run : cargo nextest run --profile ci -p gobby-wiki --no-default-features
8997
9098 # gcode: clippy + tests without embeddings (Linux CI has no cmake/Metal)
9199 - name : Clippy (gcode, no embeddings)
92100 run : cargo clippy -p gobby-code --all-targets --no-default-features -- -D warnings
93101
94102 - name : Test (gcode, no embeddings)
95- run : cargo test -p gobby-code --no-default-features
103+ run : cargo nextest run --profile ci -p gobby-code --no-default-features
96104
97105 - name : Test codewiki (gcode, no embeddings)
98- run : cargo test -p gobby-code --no-default-features codewiki
106+ run : cargo nextest run --profile ci -p gobby-code --no-default-features -E 'test(codewiki)'
107+
108+ - name : Test workspace (no default features)
109+ run : cargo nextest run --profile ci --workspace --no-default-features
110+
111+ - name : Test doctests (workspace, no default features)
112+ run : cargo test --doc --workspace --no-default-features
99113
100114 - name : Build workspace (without embeddings)
101115 run : cargo build --workspace --no-default-features
116+
117+ coverage :
118+ name : Coverage (report only)
119+ runs-on : ubuntu-latest
120+ continue-on-error : true
121+ steps :
122+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
123+ with :
124+ persist-credentials : false
125+
126+ - name : Install Rust toolchain
127+ uses : dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
128+ with :
129+ toolchain : stable
130+ components : llvm-tools-preview
131+
132+ - name : Install cargo-llvm-cov
133+ uses : taiki-e/install-action@f5b277aa8941a90c16bc1cd6ab9363e0502b7d31
134+ with :
135+ tool : cargo-llvm-cov
136+
137+ - name : Install cargo-nextest
138+ uses : taiki-e/install-action@f5b277aa8941a90c16bc1cd6ab9363e0502b7d31
139+ with :
140+ tool : nextest
141+
142+ - name : Cache cargo registry & build
143+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
144+ with :
145+ path : |
146+ ~/.cargo/registry
147+ ~/.cargo/git
148+ target
149+ key : ${{ runner.os }}-coverage-cargo-${{ hashFiles('Cargo.lock') }}
150+ restore-keys : ${{ runner.os }}-coverage-cargo-
151+
152+ - name : Generate LCOV report
153+ run : |
154+ cargo llvm-cov clean --workspace
155+ cargo llvm-cov --no-report nextest --workspace --no-default-features --profile ci
156+ cargo llvm-cov report --lcov --output-path lcov.info
157+
158+ - name : Upload LCOV artifact
159+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
160+ if : always()
161+ with :
162+ name : lcov
163+ path : lcov.info
164+ if-no-files-found : ignore
0 commit comments