mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
Redesign CI to speed up PR feedback by deferring heavy tests to a 30-minute batch on the staging branch. PRs only run fmt + clippy + regression-test-check. The batch CI runs tests, E2E, and a Claude Code review with confidence-scored findings that gate promotion to main. - test.yml: replace PR/push triggers with workflow_call + dispatch - e2e.yml: replace PR paths trigger with workflow_call - coverage.yml: add workflow_call + dispatch triggers - code_style.yml: absorb version-check job from test.yml - staging-ci.yml: new orchestrator (30-min cron, change detection, tests + e2e + claude-review → gate → tag + promote-to-main) - claude-review.yml: new reusable review workflow with 0-100 confidence scoring (CRITICAL ≥80 blocks, ≥50 creates issues, <50 CRITICAL gets low-confidence label) - create-labels.sh: add staging-ci-review, skip-claude-gate, low-confidence labels Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
97 lines
3.0 KiB
YAML
97 lines
3.0 KiB
YAML
name: E2E Tests
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * 1" # Weekly Monday 6 AM UTC
|
|
workflow_call: # Called by staging-ci.yml
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# ── Step 1: compile once ──────────────────────────────────────────────────
|
|
build:
|
|
name: Build ironclaw (libsql)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
target
|
|
~/.cargo/registry
|
|
key: e2e-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Build
|
|
run: cargo build --no-default-features --features libsql
|
|
|
|
- name: Upload binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ironclaw-e2e-binary
|
|
path: target/debug/ironclaw
|
|
retention-days: 1
|
|
|
|
# ── Step 2: run test slices in parallel ───────────────────────────────────
|
|
test:
|
|
name: E2E (${{ matrix.group }})
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- group: core
|
|
files: "tests/e2e/scenarios/test_connection.py tests/e2e/scenarios/test_chat.py tests/e2e/scenarios/test_sse_reconnect.py tests/e2e/scenarios/test_html_injection.py"
|
|
- group: features
|
|
files: "tests/e2e/scenarios/test_skills.py tests/e2e/scenarios/test_tool_approval.py"
|
|
- group: extensions
|
|
files: "tests/e2e/scenarios/test_extensions.py"
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Download binary
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ironclaw-e2e-binary
|
|
path: target/debug/
|
|
|
|
- name: Make binary executable
|
|
run: chmod +x target/debug/ironclaw
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install E2E dependencies
|
|
run: |
|
|
cd tests/e2e
|
|
pip install -e .
|
|
playwright install --with-deps chromium
|
|
|
|
- name: Run E2E tests (${{ matrix.group }})
|
|
run: pytest ${{ matrix.files }} -v --timeout=120
|
|
|
|
- name: Upload screenshots on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: e2e-screenshots-${{ matrix.group }}
|
|
path: tests/e2e/screenshots/
|
|
if-no-files-found: ignore
|
|
|
|
# ── Roll-up for branch protection ────────────────────────────────────────
|
|
e2e:
|
|
name: E2E Tests
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs: [test]
|
|
steps:
|
|
- run: |
|
|
if [[ "${{ needs.test.result }}" != "success" ]]; then
|
|
echo "One or more E2E jobs failed"
|
|
exit 1
|
|
fi
|