* ci: reduce PR check time from ~30 min to ~1 min - merge lint + prettier into single code-quality workflow - add concurrency groups to cancel stale runs on rapid pushes - add path filters so irrelevant changes skip checks - make full nix build opt-in via "nix" label (eval-only by default) - add nix store caching via magic-nix-cache-action - cache trusted-signing-cli binary on windows builds - upgrade setup-bun from v1 to v2 * ci: add workflow path filters and expand nix build triggers - add .github/workflows/** to path filters on code-quality and nix-check so CI runs when workflow files themselves change - include tauri.conf.json and build.rs in nix full-build diff check since these can break nix sandbox builds independently of cargo builds
36 lines
1,023 B
YAML
36 lines
1,023 B
YAML
name: "test"
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "src-tauri/**"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rust-tests:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libasound2-dev libssl-dev libgtk-layer-shell-dev
|
|
|
|
- uses: swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: "./src-tauri -> target"
|
|
|
|
- name: Use mock TranscriptionManager (CI only)
|
|
working-directory: src-tauri
|
|
run: |
|
|
# Swap to mock adapter - avoids compiling whisper/Vulkan
|
|
cp src/managers/transcription_mock.rs src/managers/transcription.rs
|
|
sed -i '/^transcribe-rs/d' Cargo.toml
|
|
|
|
- name: Run Rust tests
|
|
working-directory: src-tauri
|
|
run: cargo test
|