mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-26 07:26:46 +00:00
Constraint: roadmap-next-id.sh must preserve single-id stdout on success while failing closed if duplicate validation cannot run. Rejected: Relying only on CI/pre-push duplicate checks | the helper is used immediately before appending and must not certify an already-poisoned file. Confidence: high Scope-risk: narrow Directive: Keep roadmap-next-id.sh stdout machine-clean; route validation failures and checker availability errors to stderr, and keep focused helper behavior coverage in the docs/ROADMAP CI path. Tested: scripts/roadmap-next-id.sh ROADMAP.md printed 725 before appending #725 and 726 after; temp ROADMAP with duplicate 999 exited nonzero and listed duplicate id; scripts/roadmap-check-ids.sh ROADMAP.md; bash -n scripts/roadmap-next-id.sh scripts/roadmap-check-ids.sh; python -m unittest discover -s tests -p test_roadmap_helpers.py; python -m pytest tests/test_roadmap_helpers.py -q; SKIP_CLAW_PRE_PUSH_BUILD=1 bash .github/hooks/pre-push Not-tested: full cargo workspace build, unchanged docs/script-only path
162 lines
4.3 KiB
YAML
162 lines
4.3 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/**
|
|
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/**
|
|
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@v4
|
|
- uses: actions/setup-python@v5
|
|
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@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
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@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
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@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- name: Run workspace clippy
|
|
run: cargo clippy --workspace
|
|
|
|
windows-smoke:
|
|
name: windows PowerShell smoke
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
working-directory: rust
|
|
shell: pwsh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust -> target
|
|
- 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
|
|
}
|