test: align app switcher expectations #164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop, fix/*] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Check (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, windows-2022, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| build-essential pkg-config libssl-dev \ | |
| libgtk-3-dev librsvg2-dev libayatana-appindicator3-dev \ | |
| libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Check (lib) | |
| run: cargo check --manifest-path src-tauri/Cargo.toml --lib | |
| - name: Create dist-web placeholder for RustEmbed | |
| run: | | |
| mkdir -p dist-web | |
| echo '<!DOCTYPE html><html><head><title>placeholder</title></head><body></body></html>' > dist-web/index.html | |
| - name: Check (web-server) | |
| run: cargo check --manifest-path src-tauri/Cargo.toml --features web-server --example server | |
| - name: Test | |
| run: cargo test --manifest-path src-tauri/Cargo.toml --lib | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| build-essential pkg-config libssl-dev \ | |
| libgtk-3-dev librsvg2-dev libayatana-appindicator3-dev \ | |
| libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Clippy | |
| run: cargo clippy --manifest-path src-tauri/Cargo.toml --lib -- -D warnings | |
| - name: Format check | |
| run: cargo fmt --manifest-path src-tauri/Cargo.toml -- --check | |
| frontend-test: | |
| name: Frontend Test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.10.0 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: pnpm typecheck | |
| - name: Test | |
| run: pnpm vitest run | |
| integration-test: | |
| name: Integration Test (Linux) | |
| needs: [check, frontend-test] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| build-essential pkg-config libssl-dev \ | |
| libgtk-3-dev librsvg2-dev libayatana-appindicator3-dev \ | |
| libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Create dist-web placeholder for RustEmbed | |
| run: | | |
| mkdir -p dist-web | |
| echo '<!DOCTYPE html><html><head><title>placeholder</title></head><body></body></html>' > dist-web/index.html | |
| - name: Integration tests | |
| run: cargo test --manifest-path src-tauri/Cargo.toml --tests |