mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
* fix(ci): secrets can't be used in step if conditions [skip-regression-check] (#787) GitHub Actions step-level `if:` doesn't have access to `secrets` context. Replace `if: secrets.X != ''` with `continue-on-error: true` and let the Set token step handle the fallback. Co-authored-by: Claude Sonnet 4.6 <[email protected]> * fix(ci): clean up staging pipeline — remove hacks, skip redundant checks [skip-regression-check] (#794) - Remove continue-on-error from staging-ci.yml app token steps (secrets are configured) - Skip test.yml and code_style.yml on PRs targeting staging (staging-ci.yml already runs tests before promoting, promotion PR gets full CI on main) - Allow ironclaw-ci[bot] in Claude Code review for bot-created promotion PRs Co-authored-by: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Henry Park <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]>
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
name: Code Style
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
format:
|
|
name: Formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: Clippy (${{ matrix.name }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: all-features
|
|
flags: "--all-features"
|
|
- name: default
|
|
flags: ""
|
|
- name: libsql-only
|
|
flags: "--no-default-features --features libsql"
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: clippy-${{ matrix.name }}
|
|
- name: Check lints
|
|
run: cargo clippy --all --benches --tests --examples ${{ matrix.flags }} -- -D warnings
|
|
|
|
clippy-windows:
|
|
name: Clippy Windows (${{ matrix.name }})
|
|
if: github.base_ref == 'main'
|
|
runs-on: windows-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: all-features
|
|
flags: "--all-features"
|
|
- name: default
|
|
flags: ""
|
|
- name: libsql-only
|
|
flags: "--no-default-features --features libsql"
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: clippy-windows-${{ matrix.name }}
|
|
- name: Check lints
|
|
run: cargo clippy --all --benches --tests --examples ${{ matrix.flags }} -- -D warnings
|
|
|
|
# Roll-up job for branch protection
|
|
code-style:
|
|
name: Code Style (fmt + clippy)
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs: [format, clippy, clippy-windows]
|
|
steps:
|
|
- run: |
|
|
if [[ "${{ needs.format.result }}" != "success" || "${{ needs.clippy.result }}" != "success" ]]; then
|
|
echo "One or more jobs failed"
|
|
exit 1
|
|
fi
|
|
# clippy-windows only runs on main PRs, so skip/success are both acceptable
|
|
if [[ "${{ needs.clippy-windows.result }}" == "failure" ]]; then
|
|
echo "Windows clippy failed"
|
|
exit 1
|
|
fi
|