chore(docker): avoid version arg cache busting #121
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] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # Formatting check - only needs to run once since cargo fmt is purely textual | |
| # (no compilation, so no platform-specific code paths like #[cfg(target_os)]) | |
| format: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.88" | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| # Build, lint, and test on multiple platforms | |
| # Clippy/build/test must run on each platform because #[cfg(target_os)] causes | |
| # different code to compile (e.g., systemd.rs on Linux, launchd.rs on macOS) | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.88" | |
| components: clippy | |
| - name: Install just | |
| uses: extractions/setup-just@v2 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Node dependencies | |
| run: pnpm install | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Build Rust | |
| run: cargo build --workspace | |
| - name: Test Rust | |
| run: cargo test --workspace | |
| - name: Build Node packages | |
| run: | | |
| pnpm -C packages/core build | |
| pnpm -C packages/cli-node build | |
| - name: Verify CLI works | |
| run: cargo run -p opencode-cloud -- --version | |
| # Node CLI is deprecated and exits with error, so we don't verify it |