Skip to content

Commit 77fd0b7

Browse files
authored
[gobby-cli-#505] release: gcode 1.0.0, gwiki 0.3.0, gcore 0.4.0, patch gsqz/gloc/ghook (#7)
release: gcode 1.0.0, gwiki 0.3.0, gcore 0.4.0, patch gsqz/gloc/ghook
2 parents fe1dc1d + b9add20 commit 77fd0b7

274 files changed

Lines changed: 32569 additions & 22988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ inheritance: true
33

44
reviews:
55
profile: assertive
6+
path_filters:
7+
- "!.gobby/plans/completed/**"
8+
- "!docs/plans/completed/**"

.config/nextest.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
nextest-version = { required = "0.9.133" }
2+
3+
[profile.default]
4+
fail-fast = false
5+
6+
[profile.ci]
7+
inherits = "default"
8+
fail-fast = false
9+
10+
[test-groups]
11+
serial-db = { max-threads = 1 }
12+
13+
[[profile.default.overrides]]
14+
filter = 'package(gobby-code) & (test(::serial_db::) | test(serial_db::))'
15+
test-group = 'serial-db'
16+
17+
[[profile.default.overrides]]
18+
filter = 'package(gobby-wiki) & (test(::serial_db::) | test(serial_db::))'
19+
test-group = 'serial-db'

.github/workflows/ci.yml

Lines changed: 76 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/release-gcode.yml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@ jobs:
1313
name: Test before release
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
17+
with:
18+
persist-credentials: false
1719

1820
- name: Install Rust toolchain
19-
uses: dtolnay/rust-toolchain@stable
21+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
2022
with:
23+
toolchain: stable
2124
components: clippy
2225

26+
- name: Install cargo-nextest
27+
uses: taiki-e/install-action@f5b277aa8941a90c16bc1cd6ab9363e0502b7d31
28+
with:
29+
tool: nextest
30+
2331
- name: Verify tag matches Cargo.toml version
2432
# Guards against tag/crate/release drift: installers resolve a version
2533
# from crates.io and then look for a matching gcode-v{version} GitHub
@@ -46,10 +54,16 @@ jobs:
4654
run: cargo clippy -p gobby-code --no-default-features -- -D warnings
4755

4856
- name: Run tests
49-
run: cargo test -p gobby-code
57+
run: cargo nextest run --profile ci -p gobby-code
58+
59+
- name: Run doctests
60+
run: cargo test --doc -p gobby-code
5061

5162
- name: Run tests without default features
52-
run: cargo test -p gobby-code --no-default-features
63+
run: cargo nextest run --profile ci -p gobby-code --no-default-features
64+
65+
- name: Run doctests without default features
66+
run: cargo test --doc -p gobby-code --no-default-features
5367

5468
build:
5569
needs: test
@@ -80,11 +94,14 @@ jobs:
8094
name: ${{ matrix.target }}
8195

8296
steps:
83-
- uses: actions/checkout@v4
97+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
98+
with:
99+
persist-credentials: false
84100

85101
- name: Install Rust toolchain
86-
uses: dtolnay/rust-toolchain@stable
102+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
87103
with:
104+
toolchain: stable
88105
targets: ${{ matrix.target }}
89106

90107
- name: Install cross-compilation tools (Linux ARM)
@@ -136,10 +153,14 @@ jobs:
136153
runs-on: ubuntu-latest
137154

138155
steps:
139-
- uses: actions/checkout@v4
156+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
157+
with:
158+
persist-credentials: false
140159

141160
- name: Install Rust toolchain
142-
uses: dtolnay/rust-toolchain@stable
161+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
162+
with:
163+
toolchain: stable
143164

144165
- name: Publish gobby-code to crates.io
145166
run: cargo publish -p gobby-code
@@ -152,14 +173,26 @@ jobs:
152173

153174
steps:
154175
- name: Download all artifacts
155-
uses: actions/download-artifact@v4
176+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
156177
with:
157178
merge-multiple: true
158179

180+
- name: Generate SHA-256 checksums
181+
# Installers fetch <asset>.sha256 and verify the archive before
182+
# chmod/PATH placement (fail-closed on missing/mismatched checksum).
183+
shell: bash
184+
run: |
185+
set -euo pipefail
186+
shopt -s nullglob
187+
for asset in gcode-*.tar.gz gcode-*.zip; do
188+
sha256sum "$asset" > "$asset.sha256"
189+
done
190+
159191
- name: Create GitHub Release
160-
uses: softprops/action-gh-release@v2
192+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65
161193
with:
162194
files: |
163195
gcode-*.tar.gz
164196
gcode-*.zip
197+
gcode-*.sha256
165198
generate_release_notes: true

.github/workflows/release-gcore.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,50 @@ jobs:
1313
name: Test before release
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
17+
with:
18+
persist-credentials: false
1719

1820
- name: Install Rust toolchain
19-
uses: dtolnay/rust-toolchain@stable
21+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
2022
with:
23+
toolchain: stable
2124
components: clippy
2225

26+
- name: Install cargo-nextest
27+
uses: taiki-e/install-action@f5b277aa8941a90c16bc1cd6ab9363e0502b7d31
28+
with:
29+
tool: nextest
30+
2331
- name: Clippy
2432
run: cargo clippy -p gobby-core --all-targets -- -D warnings
2533

2634
- name: Run tests
27-
run: cargo test -p gobby-core
35+
run: cargo nextest run --profile ci --workspace
36+
37+
- name: Run tests without default features
38+
run: cargo nextest run --profile ci --workspace --no-default-features
39+
40+
- name: Run doctests
41+
run: cargo test --doc --workspace
42+
43+
- name: Run doctests without default features
44+
run: cargo test --doc --workspace --no-default-features
2845

2946
publish:
47+
name: Publish
3048
needs: test
3149
runs-on: ubuntu-latest
3250

3351
steps:
34-
- uses: actions/checkout@v4
52+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
53+
with:
54+
persist-credentials: false
3555

3656
- name: Install Rust toolchain
37-
uses: dtolnay/rust-toolchain@stable
57+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
58+
with:
59+
toolchain: stable
3860

3961
- name: Publish gobby-core to crates.io
4062
run: cargo publish -p gobby-core

0 commit comments

Comments
 (0)