* ci: add full build and quality checks on push to main Adds a new main-build.yml workflow that runs the full 7-platform build matrix on every push to main, uploading artifacts for 30 days. Also adds push-to-main triggers to code-quality, test, and nix-check workflows. The nix full build now always runs on main pushes (not just when nix packaging files change), catching the expensive breakage that currently requires manual verification before each release. * ci: fix permissions and clarify nix full-build intent - narrow contents: write to contents: read in main-build.yml — no release assets are uploaded here so write access is unnecessary - update nix-check comment to reflect that the full build always runs on push to main (not just when nix files change), matching intent
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: "test"
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "src-tauri/**"
|
|
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
|