Repository navigation
feat: bots and browsers on Linux and macOS #205
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: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-windows: | |
| name: Rust (Windows) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fmt --all --check | |
| - run: cargo clippy --workspace --all-targets -- -D warnings | |
| - run: cargo test --workspace | |
| - name: Generated TypeScript bindings are up to date | |
| run: git diff --exit-code -- app/src/lib/protocol.gen.ts | |
| # The daemon and its crates off Windows (spec 18, item 8). Plain `cargo` | |
| # builds the default members only: the app crates need the desktop | |
| # libraries of each system and join later. | |
| rust-unix: | |
| name: Rust (${{ matrix.name }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Ubuntu | |
| os: ubuntu-latest | |
| - name: macOS | |
| os: macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-targets -- -D warnings | |
| # The runner image ships Edge and Chrome with sandbox helpers that are | |
| # not setuid root, as their packages would leave them, so they refuse | |
| # to start. The browser tests need a working sandbox. | |
| - name: Browser sandbox helpers as their packages set them | |
| if: runner.os == 'Linux' | |
| run: | | |
| for helper in /opt/microsoft/msedge/msedge-sandbox /opt/google/chrome/chrome-sandbox; do | |
| if [ -f "$helper" ]; then | |
| sudo chown root:root "$helper" | |
| sudo chmod 4755 "$helper" | |
| fi | |
| done | |
| - run: cargo test | |
| app: | |
| name: App (Windows) | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: app | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: app/package.json | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| cache-dependency-path: app/pnpm-lock.yaml | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm check | |
| - run: pnpm build | |
| - name: The setup window's page builds too (spec 15.7) | |
| run: pnpm exec vite build --mode setup |