mirror of
https://github.com/nearai/ironclaw.git
synced 2026-09-03 08:06:01 +08:00
141 lines
3.9 KiB
YAML
141 lines
3.9 KiB
YAML
name: Reborn E2E
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
description: Commit SHA or ref to test
|
|
required: false
|
|
type: string
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "crates/ironclaw_*/**"
|
|
- "docs/reborn/**"
|
|
- "scripts/reborn-e2e-rust.sh"
|
|
- "tests/e2e/**"
|
|
- "build.rs"
|
|
- "providers.json"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- ".github/workflows/reborn-e2e.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "crates/ironclaw_*/**"
|
|
- "docs/reborn/**"
|
|
- "scripts/reborn-e2e-rust.sh"
|
|
- "tests/e2e/**"
|
|
- "build.rs"
|
|
- "providers.json"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- ".github/workflows/reborn-e2e.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: reborn-e2e-${{ github.event_name }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rust-reborn:
|
|
name: Rust Reborn (${{ matrix.group }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 35
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
group:
|
|
- architecture
|
|
- runtimes
|
|
- substrates
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
ref: ${{ inputs.ref || github.sha }}
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
|
|
- name: Restore Rust cache
|
|
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
|
with:
|
|
key: reborn-e2e-${{ matrix.group }}
|
|
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Run deterministic Reborn Rust gate
|
|
env:
|
|
CARGO_TEST_ARGS: "-- --nocapture"
|
|
run: scripts/reborn-e2e-rust.sh ${{ matrix.group }}
|
|
|
|
gateway-smoke:
|
|
name: Reborn gateway smoke
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
ref: ${{ inputs.ref || github.sha }}
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
|
|
- name: Restore Rust cache
|
|
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
|
with:
|
|
key: reborn-e2e-gateway-smoke
|
|
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Build ironclaw with libSQL
|
|
run: cargo build --no-default-features --features libsql
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install E2E dependencies
|
|
run: |
|
|
cd tests/e2e
|
|
pip install -e .
|
|
playwright install --with-deps chromium
|
|
|
|
- name: Run Reborn gateway smoke
|
|
run: pytest tests/e2e/scenarios/test_reborn_gateway_smoke.py -v --timeout=120
|
|
|
|
- name: Upload screenshots on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
name: reborn-e2e-screenshots
|
|
path: tests/e2e/screenshots/
|
|
if-no-files-found: ignore
|
|
|
|
reborn-e2e:
|
|
name: Reborn E2E
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs:
|
|
- rust-reborn
|
|
- gateway-smoke
|
|
steps:
|
|
- name: Check Reborn E2E jobs
|
|
run: |
|
|
if [[ "${{ needs.rust-reborn.result }}" != "success" ]]; then
|
|
echo "Rust Reborn E2E failed"
|
|
exit 1
|
|
fi
|
|
if [[ "${{ needs.gateway-smoke.result }}" != "success" ]]; then
|
|
echo "Reborn gateway smoke failed"
|
|
exit 1
|
|
fi
|