|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +env: |
| 10 | + CARGO_TERM_COLOR: always |
| 11 | + |
| 12 | +jobs: |
| 13 | + lint-ui: |
| 14 | + name: Lint UI |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Setup pnpm |
| 20 | + uses: pnpm/action-setup@v4 |
| 21 | + with: |
| 22 | + version: 10 |
| 23 | + |
| 24 | + - name: Setup Node.js |
| 25 | + uses: actions/setup-node@v4 |
| 26 | + with: |
| 27 | + node-version: 24 |
| 28 | + cache: pnpm |
| 29 | + |
| 30 | + - name: Install dependencies |
| 31 | + run: pnpm install --frozen-lockfile |
| 32 | + |
| 33 | + - name: Lint |
| 34 | + run: pnpm --filter ui check |
| 35 | + |
| 36 | + test-ui: |
| 37 | + name: Test UI |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + |
| 42 | + - name: Setup pnpm |
| 43 | + uses: pnpm/action-setup@v4 |
| 44 | + with: |
| 45 | + version: 10 |
| 46 | + |
| 47 | + - name: Setup Node.js |
| 48 | + uses: actions/setup-node@v4 |
| 49 | + with: |
| 50 | + node-version: 24 |
| 51 | + cache: pnpm |
| 52 | + |
| 53 | + - name: Install dependencies |
| 54 | + run: pnpm install --frozen-lockfile |
| 55 | + |
| 56 | + - name: Test |
| 57 | + run: pnpm --filter ui test |
| 58 | + |
| 59 | + lint-rust: |
| 60 | + name: Lint Rust |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v4 |
| 64 | + |
| 65 | + - name: Setup Rust |
| 66 | + uses: dtolnay/rust-action@stable |
| 67 | + with: |
| 68 | + components: rustfmt, clippy |
| 69 | + |
| 70 | + - name: Cache cargo |
| 71 | + uses: Swatinem/rust-cache@v2 |
| 72 | + with: |
| 73 | + workspaces: src-tauri |
| 74 | + |
| 75 | + - name: Install Tauri dependencies |
| 76 | + run: | |
| 77 | + sudo apt-get update |
| 78 | + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev |
| 79 | +
|
| 80 | + - name: Check formatting |
| 81 | + run: cargo fmt --manifest-path src-tauri/Cargo.toml -- --check |
| 82 | + |
| 83 | + - name: Clippy |
| 84 | + run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings |
| 85 | + |
| 86 | + build-check: |
| 87 | + name: Build Check |
| 88 | + runs-on: windows-latest |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v4 |
| 91 | + |
| 92 | + - name: Setup pnpm |
| 93 | + uses: pnpm/action-setup@v4 |
| 94 | + with: |
| 95 | + version: 10 |
| 96 | + |
| 97 | + - name: Setup Node.js |
| 98 | + uses: actions/setup-node@v4 |
| 99 | + with: |
| 100 | + node-version: 24 |
| 101 | + cache: pnpm |
| 102 | + |
| 103 | + - name: Setup Rust |
| 104 | + uses: dtolnay/rust-action@stable |
| 105 | + |
| 106 | + - name: Cache cargo |
| 107 | + uses: Swatinem/rust-cache@v2 |
| 108 | + with: |
| 109 | + workspaces: src-tauri |
| 110 | + |
| 111 | + - name: Install dependencies |
| 112 | + run: pnpm install --frozen-lockfile |
| 113 | + |
| 114 | + - name: Build UI |
| 115 | + run: pnpm --filter ui build |
| 116 | + |
| 117 | + - name: Check Rust build |
| 118 | + run: cargo check --manifest-path src-tauri/Cargo.toml |
0 commit comments