Skip to content

chore(docs): sync project state to v0.7.0 released (#35) #99

chore(docs): sync project state to v0.7.0 released (#35)

chore(docs): sync project state to v0.7.0 released (#35) #99

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
audit:
runs-on: ubuntu-22.04
name: Security Audit
steps:
- uses: actions/checkout@v4
- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
manifest-path: src-tauri/Cargo.toml
command: check
arguments: --all-features
check:
strategy:
fail-fast: false
matrix:
include:
- platform: windows-latest
label: Windows
- platform: macos-latest
label: macOS
- platform: ubuntu-22.04
label: Linux
runs-on: ${{ matrix.platform }}
name: ${{ matrix.label }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Rust toolchain
run: rustup toolchain install
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install system dependencies (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
- name: Install frontend dependencies
run: npm ci
- name: Local CI parity checks
run: npm run ci
# `npm run ci` runs `cargo test --no-default-features` (matches local pre-push).
# This job exercises the DEFAULT feature path (`plugin-shortcuts` enabled) so
# the production code path stays green and feature-gated code doesn't drift.
cargo-test-default-features:
runs-on: ubuntu-22.04
name: Rust tests (default features)
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup toolchain install
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: default-features
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
- name: cargo test (default features)
run: cargo test --manifest-path src-tauri/Cargo.toml
# Backend coverage gate. Linux-only because cargo-llvm-cov produces consistent
# numbers on a single platform. Thresholds are 90% lines / 85% functions —
# raise as coverage improves; do not lower without an ADR. Files excluded
# from the count are thin OS/IPC shims that cannot be unit-tested:
# - platform/{windows,macos,linux}.rs : OS API thin wrappers
# - services/sound.rs : rodio audio-device wrapper
# - logging.rs / main.rs : startup-only entry shims
# - commands/mod.rs : Tauri IPC command wrappers
# (#[cfg(not(test))]). Helper validate_* functions inside it ARE
# fully covered by unit tests; the file is excluded only because the
# IPC surface dominates the line count and pollutes the threshold.
cargo-coverage:
runs-on: ubuntu-22.04
name: Rust coverage (>=90% lines, >=85% functions)
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain + llvm-tools
run: |
rustup toolchain install
rustup component add llvm-tools-preview
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: coverage
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
- name: cargo llvm-cov
run: |
cargo llvm-cov --manifest-path src-tauri/Cargo.toml \
--ignore-filename-regex 'platform/(windows|macos|linux)\.rs|services/sound\.rs|logging\.rs|main\.rs|commands/mod\.rs' \
--fail-under-lines 90 \
--fail-under-functions 85 \
--summary-only