mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
- Remove broken skip-claude-gate label check (label always exists after bootstrap); keep only workflow_dispatch input override - Require claude-review.result == 'success' in gate condition so a crashed review blocks promotion instead of silently passing - Load review prompt into GITHUB_ENV instead of $(cat) in YAML with: block (YAML doesn't do shell substitution) - version-check roll-up: check != 'success' instead of == 'failure' to catch cancelled/skipped states - Force run: set diff_range to valid empty range when no new commits - Align low-confidence label spacing in create-labels.sh Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Code Style
|
|
on:
|
|
pull_request:
|
|
|
|
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:
|
|
profile: minimal
|
|
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:
|
|
profile: minimal
|
|
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
|
|
|
|
version-check:
|
|
name: Version Bump Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check version bumps for changed extensions
|
|
env:
|
|
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}
|
|
run: ./scripts/check-version-bumps.sh
|
|
|
|
# Roll-up job for branch protection
|
|
code-style:
|
|
name: Code Style (fmt + clippy)
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs: [format, clippy, version-check]
|
|
steps:
|
|
- run: |
|
|
if [[ "${{ needs.format.result }}" != "success" || "${{ needs.clippy.result }}" != "success" ]]; then
|
|
echo "One or more jobs failed"
|
|
exit 1
|
|
fi
|
|
if [[ "${{ needs.version-check.result }}" != "success" ]]; then
|
|
echo "Version bump check did not succeed (status: ${{ needs.version-check.result }})"
|
|
exit 1
|
|
fi
|