mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 03:24:54 +00:00
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
name: check-cli-rs
|
|
|
|
# Checks packages/cli-rs, the Rust client, which check-test.yml leaves out. Pull requests run it only when they change
|
|
# the client. Its tests and check:drift also compare it with the TypeScript packages below, so a dev push that changes
|
|
# one runs it too: a TypeScript change that breaks the client shows on dev, not on other teams' pull requests.
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- packages/cli-rs/**
|
|
- .github/workflows/check-cli-rs.yml
|
|
push:
|
|
branches: [dev]
|
|
paths:
|
|
- packages/cli-rs/**
|
|
- packages/cli/src/**
|
|
- packages/client/**
|
|
- packages/plugin/**
|
|
- packages/protocol/**
|
|
- packages/schema/**
|
|
- packages/theme/**
|
|
- packages/tui/**
|
|
- packages/util/**
|
|
- bun.lock
|
|
- .github/workflows/check-cli-rs.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 45
|
|
defaults:
|
|
run:
|
|
working-directory: packages/cli-rs
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
# Bun and node_modules: the tests and check:drift run the TypeScript side they compare against.
|
|
- uses: ./.github/actions/setup-bun
|
|
# rustup reads rust-toolchain.toml; `bun run cargo` first fetches OpenTUI's native library from its release.
|
|
- run: rustup toolchain install
|
|
- run: bun run cargo fmt --check
|
|
- run: bun run cargo clippy --locked --workspace --all-targets -- -D warnings
|
|
# Every crate's tests, even after one fails, so one run shows every failure.
|
|
- run: bun run cargo test --locked --workspace --no-fail-fast
|
|
- run: bun run check:drift
|