CI #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - tna_testnet | |
| pull_request: | |
| schedule: | |
| # Nightly, not on every PR — matches the resource-bound adversarial-test exit criteria in | |
| # docs/consensus-implementation-completion-checklist.md §8. | |
| - cron: '17 3 * * *' | |
| workflow_dispatch: {} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Test (workspace) | |
| run: cargo test --workspace --locked | |
| consensus-restart-recovery: | |
| # Real 3-process testnet: kills a validator mid-run and resumes it on a stale (rolled-back) | |
| # data directory, then asserts the fleet reconverges. Nightly/manual only (not per-PR) — it | |
| # builds a release binary and runs a multi-minute local testnet. See | |
| # docs/consensus-implementation-completion-checklist.md Phase 10 and | |
| # scripts/consensus-restart-recovery-e2e.sh. | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Restart-recovery E2E | |
| run: bash scripts/consensus-restart-recovery-e2e.sh | |
| - name: Upload node logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: consensus-restart-recovery-logs | |
| path: testnet/node*/logs/ | |
| if-no-files-found: ignore | |
| consensus-e2e: | |
| # Checklist §7.2-7.4: real 3-process testnet under single-follower batch-delivery drop, | |
| # asymmetric partition, and clock skew. Nightly/manual only, same rationale as | |
| # consensus-restart-recovery above. One shared release build amortized across all three | |
| # scenarios. Each script has its own `trap cleanup EXIT` (netctl.sh testnet down + iptables | |
| # rule cleanup), so a mid-sequence failure still tears down before the next step runs. | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build (release) | |
| run: cargo build --release -p catalyst-cli | |
| - name: Single-follower batch-drop E2E (§7.2) | |
| run: CLEAN=false bash scripts/consensus-follower-batch-drop-e2e.sh | |
| - name: Asymmetric partition E2E (§7.3) | |
| run: CLEAN=false bash scripts/consensus-partition-e2e.sh | |
| - name: Clock-skew E2E (§7.4) | |
| run: CLEAN=false bash scripts/consensus-clock-skew-e2e.sh | |
| - name: Upload node logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: consensus-e2e-logs | |
| path: testnet/node*/logs/ | |
| if-no-files-found: ignore | |