|
| 1 | +--- |
| 2 | +name: erigon-ci |
| 3 | +description: | |
| 4 | + Run Erigon CI checks locally and/or trigger them remotely on a branch via GitHub Actions workflow_dispatch. |
| 5 | + Use this when you need to verify a branch passes all CI before or after pushing — especially for branches |
| 6 | + like bal-devnet-2 that don't auto-trigger on push/PR events. |
| 7 | +--- |
| 8 | + |
| 9 | +# Erigon CI Skill |
| 10 | + |
| 11 | +Orchestrates CI verification: run test groups locally and/or dispatch GitHub Actions on any branch. |
| 12 | + |
| 13 | +Each test group has its own dedicated skill for drill-down on failures. Use those when a specific group fails and you need to re-run individual tests. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Local Test Groups |
| 18 | + |
| 19 | +| Group | Skill | Command | Speed | Use When | |
| 20 | +|-------|-------|---------|-------|----------| |
| 21 | +| lint | *(inline)* | `make lint` | ~1 min | Before every push | |
| 22 | +| unit | `erigon-test-unit` | `make test-short` | ~5 min | Pre-push gate | |
| 23 | +| all | `erigon-test-all` | `GOGC=80 make test-all` | ~30 min | Before PR review | |
| 24 | +| race | `erigon-test-race` | `make test-all-race` | ~60 min | Concurrency changes | |
| 25 | +| hive | `erigon-test-hive` | `make test-hive` | ~20 min | EL/CL interop changes | |
| 26 | +| rpc | `erigon-test-rpc` | *(requires synced DB)* | ~10 min | RPC API changes | |
| 27 | +| assertoor | *(remote only)* | dispatch only | — | Kurtosis network test | |
| 28 | + |
| 29 | +### Lint (run first — non-deterministic, may need multiple runs) |
| 30 | +```bash |
| 31 | +make lint |
| 32 | +``` |
| 33 | + |
| 34 | +### Quick gate (before pushing a fix) |
| 35 | +```bash |
| 36 | +make lint && make test-short |
| 37 | +``` |
| 38 | + |
| 39 | +### Full gate (before marking PR ready for review) |
| 40 | +```bash |
| 41 | +make lint && make erigon integration && GOGC=80 make test-all |
| 42 | +``` |
| 43 | + |
| 44 | +### Race check (for concurrency-sensitive changes) |
| 45 | +```bash |
| 46 | +make lint && make test-all-race |
| 47 | +``` |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## Part 2: Remote Dispatch (trigger CI on any branch) |
| 52 | + |
| 53 | +Use `gh workflow run` to trigger workflows on a branch. Required for branches not targeting main (e.g. `bal-devnet-2`). |
| 54 | + |
| 55 | +### Dispatch all workflows on a branch |
| 56 | + |
| 57 | +```bash |
| 58 | +BRANCH=$(git branch --show-current) # or set explicitly: BRANCH="bal-devnet-2" |
| 59 | + |
| 60 | +for wf in \ |
| 61 | + "Unit tests" \ |
| 62 | + "All tests" \ |
| 63 | + "Lint" \ |
| 64 | + "Test Hive" \ |
| 65 | + "Kurtosis Assertoor GitHub Action" \ |
| 66 | + "QA - RPC Integration Tests" \ |
| 67 | + "QA - RPC Integration Tests Remote" \ |
| 68 | + "QA - RPC Integration Tests (Gnosis)" \ |
| 69 | + "Windows downloader tests"; do |
| 70 | + echo "Dispatching: $wf" |
| 71 | + gh workflow run "$wf" --ref $BRANCH |
| 72 | +done |
| 73 | +``` |
| 74 | + |
| 75 | +### Workflow dispatch support |
| 76 | + |
| 77 | +| Workflow name (GitHub) | dispatch? | Local skill | File | |
| 78 | +|-------------------------------------|-----------|-------------|------| |
| 79 | +| Unit tests | yes | `erigon-test-unit` | `ci.yml` | |
| 80 | +| All tests | yes | `erigon-test-all` | `test-all-erigon.yml` | |
| 81 | +| Lint | yes | *(make lint)* | `lint.yml` | |
| 82 | +| Test Hive | yes | `erigon-test-hive` | `test-hive.yml` | |
| 83 | +| Kurtosis Assertoor GitHub Action | yes | *(remote only)* | `test-kurtosis-assertoor.yml` | |
| 84 | +| QA - RPC Integration Tests | yes | `erigon-test-rpc` | `qa-rpc-integration-tests.yml` | |
| 85 | +| QA - RPC Integration Tests Remote | yes | `erigon-test-rpc` | `qa-rpc-integration-tests-remote.yml` | |
| 86 | +| QA - RPC Integration Tests (Gnosis) | yes | `erigon-test-rpc` | `qa-rpc-integration-tests-gnosis.yml` | |
| 87 | +| Windows downloader tests | yes | *(remote)* | `test-win-downloader.yml` | |
| 88 | +| Consensus spec | **no** | *(PR-only)* | `test-integration-caplin.yml` | |
| 89 | + |
| 90 | +Note: **Consensus spec** has no `workflow_dispatch` — only fires on pull_request events targeting main/release. |
| 91 | + |
| 92 | +### Monitor runs |
| 93 | + |
| 94 | +```bash |
| 95 | +BRANCH=$(git branch --show-current) |
| 96 | +gh run list --branch $BRANCH --limit 15 |
| 97 | +``` |
| 98 | + |
| 99 | +Check for failures: |
| 100 | +```bash |
| 101 | +gh run list --branch $BRANCH --limit 20 | grep -E "failure|cancelled" |
| 102 | +``` |
| 103 | + |
| 104 | +Watch a specific run: |
| 105 | +```bash |
| 106 | +gh run watch <run-id> |
| 107 | +``` |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | +## Part 3: Full CI Gate (local + remote) |
| 112 | + |
| 113 | +When preparing a devnet/feature branch for review: |
| 114 | + |
| 115 | +1. **Local gate** — fast feedback before pushing: |
| 116 | + ```bash |
| 117 | + make lint && make erigon integration && make test-short |
| 118 | + ``` |
| 119 | + |
| 120 | +2. **Push branch**: |
| 121 | + ```bash |
| 122 | + git push origin <branch> |
| 123 | + ``` |
| 124 | + |
| 125 | +3. **Dispatch all remote workflows** (use the loop from Part 2). |
| 126 | + |
| 127 | +4. **Monitor** until all pass: |
| 128 | + ```bash |
| 129 | + gh run list --branch $(git branch --show-current) --limit 15 |
| 130 | + ``` |
| 131 | + |
| 132 | +5. **Race check** (for concurrency-heavy changes): |
| 133 | + ```bash |
| 134 | + make test-all-race |
| 135 | + ``` |
0 commit comments