name: PR Auto-merge
on:
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install taplo
if: matrix.os == 'ubuntu-latest'
uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d with:
tool: taplo-cli
- name: Lint Cargo.toml
if: matrix.os == 'ubuntu-latest'
run: taplo lint Cargo.toml
- name: Check Cargo.toml formatting
if: matrix.os == 'ubuntu-latest'
run: taplo fmt --check --option reorder_keys=true Cargo.toml
- name: Update Rust toolchain
run: rustup update stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run cargo check
run: cargo check --all-features
- name: Run tests
run: cargo test --all-features
- name: Run clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: cargo fmt -- --check
test-tauri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 with:
node-version: 24
- name: Install pnpm and frontend deps
run: corepack enable && corepack prepare pnpm@latest --activate && pnpm --dir ui install --frozen-lockfile
- name: Build frontend
run: pnpm --dir ui run build
- name: Update Rust toolchain
run: rustup update stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Check Tauri compilation
run: cargo check -p cruise-gui