Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,27 @@ jobs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: 24, cache: pnpm }
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with: { rustflags: "" }
with: { rustflags: "", components: "llvm-tools-preview" }
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: rustup target add wasm32-unknown-unknown
- name: Install wasm-pack 0.14.0
run: cargo install wasm-pack --version 0.14.0 --locked
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@25435dc8dd3baed7417e0c96d3fe89013a5b2e09 # v2.81.3
with: { tool: cargo-llvm-cov }
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
- run: pnpm -r lint
- run: pnpm -r test
- run: cargo build --manifest-path packages/codec/Cargo.toml --release
- run: cargo test --manifest-path packages/codec/Cargo.toml
- name: Rust coverage gate (Constitution X — 80% line coverage)
run: cargo llvm-cov --manifest-path packages/codec/Cargo.toml --all-features --fail-under-lines 80 --lcov --output-path rust-lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
files: rust-lcov.info,packages/codec/coverage/lcov.info
flags: rust,ts
fail_ci_if_error: false
- name: Assert size budgets
run: bash scripts/assert-size.sh
working-directory: packages/codec
Expand Down
16 changes: 16 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
coverage:
status:
patch:
rust:
informational: true
project:
rust:
informational: true

flags:
rust:
paths:
- packages/codec/src/
ts:
paths:
- packages/codec/src/
3 changes: 2 additions & 1 deletion packages/codec/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default defineConfig({
// enabled: true → `vitest run` always collects + gates coverage, so the
// 80% threshold (Constitution X) is enforced by plain `pnpm -r test` in CI.
enabled: true,
include: ['src/**'],
include: ['src/**/*.ts'],
reporter: ['text', 'lcov'],
exclude: [
'target/**',
'pkg/**',
Expand Down