mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-18 00:00:00 +08:00
* fix(windows): fix native runtime compatibility and enable workspace tests Fix shell discovery, hook quoting, native path handling and OAuth randomness on Windows, make the test fixtures portable, and run the full workspace test suite in the Windows CI job. * test(plugins): make lifecycle fixtures Windows-compatible * fix(windows): address workspace test failures --------- Co-authored-by: clawdbot <clawdbot@ultraworkers.dev>
171 lines
5.1 KiB
YAML
171 lines
5.1 KiB
YAML
name: Rust CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'gaebal/**'
|
|
- 'omx-issue-*'
|
|
paths:
|
|
- .github/workflows/rust-ci.yml
|
|
- .github/scripts/check_doc_source_of_truth.py
|
|
- .github/scripts/check_release_readiness.py
|
|
- .github/FUNDING.yml
|
|
- CODE_OF_CONDUCT.md
|
|
- CONTRIBUTING.md
|
|
- LICENSE
|
|
- README.md
|
|
- SECURITY.md
|
|
- SUPPORT.md
|
|
- USAGE.md
|
|
- PARITY.md
|
|
- PHILOSOPHY.md
|
|
- ROADMAP.md
|
|
- scripts/roadmap-*.sh
|
|
- tests/test_roadmap_helpers.py
|
|
- docs/**
|
|
- rust/**
|
|
- flake.nix
|
|
- .envrc
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/workflows/rust-ci.yml
|
|
- .github/scripts/check_doc_source_of_truth.py
|
|
- .github/scripts/check_release_readiness.py
|
|
- .github/FUNDING.yml
|
|
- CODE_OF_CONDUCT.md
|
|
- CONTRIBUTING.md
|
|
- LICENSE
|
|
- README.md
|
|
- SECURITY.md
|
|
- SUPPORT.md
|
|
- USAGE.md
|
|
- PARITY.md
|
|
- PHILOSOPHY.md
|
|
- ROADMAP.md
|
|
- scripts/roadmap-*.sh
|
|
- tests/test_roadmap_helpers.py
|
|
- docs/**
|
|
- rust/**
|
|
- flake.nix
|
|
- .envrc
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: rust-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: rust
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
doc-source-of-truth:
|
|
name: docs source-of-truth
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Check docs and metadata for stale branding
|
|
run: python .github/scripts/check_doc_source_of_truth.py
|
|
- name: Check release policy docs and local links
|
|
run: python .github/scripts/check_release_readiness.py
|
|
- name: Check ROADMAP ids
|
|
run: scripts/roadmap-check-ids.sh
|
|
- name: Check ROADMAP helper behavior
|
|
run: python -m unittest discover -s tests -p test_roadmap_helpers.py
|
|
|
|
fmt:
|
|
name: cargo fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249
|
|
with:
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Check formatting
|
|
run: cargo fmt --all --check
|
|
|
|
test-workspace:
|
|
name: cargo test --workspace
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249
|
|
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Run workspace tests
|
|
run: cargo test --workspace
|
|
|
|
clippy-workspace:
|
|
name: cargo clippy --workspace
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Run workspace clippy
|
|
run: cargo clippy --workspace
|
|
|
|
windows-smoke:
|
|
name: Windows tests and PowerShell smoke
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
working-directory: rust
|
|
shell: pwsh
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249
|
|
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c
|
|
with:
|
|
workspaces: rust -> target
|
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run Windows workspace tests
|
|
run: cargo test --workspace --locked --no-fail-fast
|
|
- name: Build CLI for Windows smoke
|
|
run: cargo build -p rusty-claude-cli
|
|
- name: Smoke local commands without live credentials
|
|
env:
|
|
ANTHROPIC_API_KEY: ""
|
|
ANTHROPIC_AUTH_TOKEN: ""
|
|
OPENAI_API_KEY: ""
|
|
XAI_API_KEY: ""
|
|
DASHSCOPE_API_KEY: ""
|
|
run: |
|
|
$ErrorActionPreference = "Stop"
|
|
$env:CLAW_CONFIG_HOME = Join-Path $env:RUNNER_TEMP "claw config home"
|
|
New-Item -ItemType Directory -Force -Path $env:CLAW_CONFIG_HOME | Out-Null
|
|
$workspace = Join-Path $env:RUNNER_TEMP "claw path smoke"
|
|
New-Item -ItemType Directory -Force -Path $workspace | Out-Null
|
|
$claw = Join-Path $env:GITHUB_WORKSPACE "rust\target\debug\claw.exe"
|
|
Push-Location $workspace
|
|
try {
|
|
& $claw help
|
|
& $claw status
|
|
& $claw config env
|
|
& $claw doctor
|
|
} finally {
|
|
Pop-Location
|
|
}
|