name: CI on: push: branches: [main, master, develop] pull_request: branches: [main, master, develop] env: PYTHON_VERSION: "3.12" NODE_VERSION: "22" RUST_TOOLCHAIN: "stable" jobs: test-python: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - name: Restore uv cache uses: actions/cache@v4 timeout-minutes: 2 continue-on-error: true with: path: ~/.cache/uv key: ${{ runner.os }}-py${{ env.PYTHON_VERSION }}-uv-${{ hashFiles('pyproject.toml', 'uv.lock') }} restore-keys: | ${{ runner.os }}-py${{ env.PYTHON_VERSION }}-uv- - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y libsndfile1 portaudio19-dev ffmpeg - name: Install Python dependencies run: | python -m pip install --upgrade uv uv venv .venv source .venv/bin/activate uv pip install -e ".[dev,all]" - name: Run unit tests (parallel) run: | source .venv/bin/activate pytest tests/ -m "not integration and not slow and not stress" --asyncio-mode=auto -n auto -v - name: Run integration tests (parallel - isolated databases per worker) run: | source .venv/bin/activate pytest tests/integration/ -m "integration" --asyncio-mode=auto -n auto -v test-typescript: runs-on: ubuntu-22.04 defaults: run: working-directory: client steps: - uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} cache: npm cache-dependency-path: client/package-lock.json - name: Cache Vite build uses: actions/cache@v4 with: path: | client/node_modules/.vite client/dist key: ${{ runner.os }}-vite-${{ hashFiles('client/src/**', 'client/vite.config.ts') }} restore-keys: | ${{ runner.os }}-vite- - name: Install dependencies run: npm ci - name: Run Vitest tests run: npm run test test-rust: runs-on: ubuntu-22.04 defaults: run: working-directory: client/src-tauri steps: - uses: actions/checkout@v4 - name: Install system dependencies (Tauri) run: | sudo apt-get update sudo apt-get install -y \ libgtk-3-dev \ libwebkit2gtk-4.1-dev \ libappindicator3-dev \ librsvg2-dev \ patchelf \ libasound2-dev - name: Set up Rust uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ env.RUST_TOOLCHAIN }} - name: Cache Cargo uses: actions/cache@v4 timeout-minutes: 2 continue-on-error: true with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ client/src-tauri/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('client/src-tauri/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: Run Rust tests run: cargo test --lib