mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
ci(smoke): add fast workflow to validate 'code exec --cd' parsing and stdin redirection without full release pipeline
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
name: release-notes-smoke
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
extra_flags:
|
||||
description: "Additional flags to pass to 'code exec' (optional)"
|
||||
default: ""
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
smoke:
|
||||
name: CLI smoke (exec --cd)
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (minimal)
|
||||
shell: bash
|
||||
run: |
|
||||
rustup set profile minimal
|
||||
rustup toolchain install 1.89.0 --profile minimal
|
||||
rustup default 1.89.0
|
||||
|
||||
- name: Cache Cargo (target + registries)
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
prefix-key: v5-rust
|
||||
shared-key: codex-smoke-toolchain-1.89
|
||||
workspaces: |
|
||||
codex-rs -> target
|
||||
cache-targets: true
|
||||
cache-workspace-crates: true
|
||||
|
||||
- name: Build fast (dev-fast)
|
||||
run: ./build-fast.sh
|
||||
|
||||
- name: Show CLI help (exec)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./codex-rs/target/dev-fast/code exec --cd "$GITHUB_WORKSPACE" --full-auto --skip-git-repo-check --help | sed -n '1,80p'
|
||||
|
||||
- name: Parse-only dry run with redirection
|
||||
shell: bash
|
||||
env:
|
||||
# Intentionally blank: we only validate argument parsing, not a full model run
|
||||
OPENAI_API_KEY: ""
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# We expect this to exit non-zero due to missing API key, but only AFTER clap parses args.
|
||||
# So we treat any exit as success as long as stderr DOES NOT contain an arg‑parse error.
|
||||
set +e
|
||||
out=$(mktemp)
|
||||
err=$(mktemp)
|
||||
printf 'This is a smoke test for release notes generation.\n' | \
|
||||
./codex-rs/target/dev-fast/code exec --cd "$GITHUB_WORKSPACE" --full-auto --skip-git-repo-check ${{ inputs.extra_flags }} - \
|
||||
> "$out" 2> "$err"
|
||||
status=$?
|
||||
set -e
|
||||
if grep -E "unexpected argument|For more information, try '--help'\." "$err"; then
|
||||
echo "Arg parsing failed (see stderr above)" >&2
|
||||
cat "$err" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "CLI parsed arguments successfully (exit=$status)."
|
||||
echo "stderr (first lines):"
|
||||
sed -n '1,40p' "$err" || true
|
||||
echo "stdout (first lines):"
|
||||
sed -n '1,40p' "$out" || true
|
||||
|
||||
Reference in New Issue
Block a user