Repository navigation
- #283
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] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| run: | | |
| rustup toolchain install stable --profile minimal --component rustfmt,clippy | |
| rustup default stable | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ". -> target" | |
| shared-key: lint | |
| cache-on-failure: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Frontend build | |
| run: npx vite build | |
| - name: Rust fmt (desktop) | |
| working-directory: src-tauri | |
| run: cargo fmt --check | |
| - name: Rust fmt (CLI) | |
| working-directory: src-tauri-cli | |
| run: cargo fmt --check | |
| - name: Clippy (desktop) | |
| working-directory: src-tauri | |
| run: cargo clippy -- -D warnings | |
| - name: Clippy (CLI) | |
| working-directory: src-tauri-cli | |
| run: cargo clippy -- -D warnings | |
| - name: TypeScript check | |
| run: npx tsc --noEmit | |
| check: | |
| needs: lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| target: aarch64-apple-darwin | |
| - platform: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| - platform: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| rustup target add ${{ matrix.target }} | |
| rustup show | |
| echo "$(rustc --print sysroot)/bin" >> $GITHUB_PATH | |
| - name: Install Linux dependencies | |
| 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 | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ". -> target" | |
| shared-key: check-${{ matrix.target }} | |
| cache-on-failure: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Frontend build | |
| run: npx vite build | |
| - name: Rust check (desktop) | |
| working-directory: src-tauri | |
| run: cargo check | |
| - name: Rust check (CLI) | |
| working-directory: src-tauri-cli | |
| run: cargo check | |
| - name: Rust tests (desktop) | |
| working-directory: src-tauri | |
| run: | | |
| if [ "${{ matrix.platform }}" = "windows-latest" ]; then | |
| cargo test --no-default-features | |
| else | |
| cargo test | |
| fi | |
| shell: bash | |
| - name: Rust build CLI | |
| working-directory: src-tauri-cli | |
| run: cargo build |