Repository navigation
ci: migrate all CI to GitHub Actions and re-enable lint gates - #1316
Conversation
- delete Jenkinsfile (ci-plugin), Jenkinsfile-gitlab, .travis.yml, .gitlab-ci.yml, appveyor.yml - ci_dapps.yml: cover autonomy/bridgevmxgo/evm2/unfreeze/zksync that the Jenkins ci-plugin pipeline used to run (docker-compose-pre.sh run all) - ci_fork_test.yml: port .gitlab-ci.yml fork_test series (schedule + dispatch) - ci_autotest.yml: port make autotest_ci / autotest_tick - README: replace dead travis/appveyor badges with GitHub Actions badge Co-Authored-By: Claude <[email protected]>
- --skip-dirs=[...] unquoted: golangci-lint treats skip-dirs as a regex, so the bracket was parsed as a character class matching nearly every path, silently skipping the whole repo (bug present since 2020, which is why make linter always passed while 440+ files were unformatted) - res=$(...) captured only stdout, swallowing golangci-lint errors from stderr and faking a pass on configuration errors - drop deprecated linters deadcode/interfacer/varcheck/structcheck/golint (deprecated in golangci-lint v1.38-v1.49, no-ops in v1.53.3) - add --max-issues-per-linter=0/--max-same-issues=0 so findings are not silently truncated at the default caps - make linter: gate shellcheck at -S warning (note/info findings like SC2004/SC2317 do not fail CI) Co-Authored-By: Claude <[email protected]>
…t/misspell fixes - gofmt -s: mostly Go 1.19+ doc comment reformatting (//foo -> // foo), import grouping, and a few for-range simplifications (no semantics) - goimports: import order - gosimple: for-range over channel/select, copy() vs loop, append(slice...), fmt.Printf vs Println(Sprintf), drop redundant returns and bool compares, type-switch with bound variable, redundant map delete guards - unconvert: drop redundant type conversions (verified identical types) - misspell: fix typos in CLI help, log and error strings - ineffassign: discard results that are never read; add missing err checks in rgbx query/exec tests - verified: go vet, go build, make linter all pass Co-Authored-By: Claude <[email protected]>
- issuance/relay/paracross test-rpc.sh: capture \$? into a variable instead
of reading it after echo/condition (SC2319/SC2320); relay reported
echo's exit code (always 0) instead of the intended failure
- auto_deploy.sh: capture SendFileAndDecompressFile exit code before the
if/elif, the elif branch previously could never be taken
- mix testcase.sh: quote \$(cat ...) to prevent word splitting (SC2046)
- dockerRelayerTestEvm.sh: drop leftover 'fix}_ebrelayer\${name}' junk line
- qbft/tendermint: UNKOWN -> UNKNOWN in Query_NodeInfo placeholder strings
Co-Authored-By: Claude <[email protected]>
Un-comment make checkgofmt and make linter (disabled in 7c6910a and ca1288b in 2025-06). Both now pass: golinter.sh is fixed, shellcheck is gated at -S warning, and the repo is gofmt/goimports clean. Co-Authored-By: Claude <[email protected]>
…ion test The jerkinsci autotest mode (make autotest_ci) ran the same autotest binary and case set as build.yml's existing autotest job (local mode), only wrapped in docker, so its CI job was redundant. The gitlabci mode (make autotest_tick) is an unmaintained upstream script whose 'close auto mining then expect blocks' logic does not match current chain behavior (height stays 0, no ticket bind step). Replace both with a ticket dapp integration test: - plugin/dapp/ticket/cmd/build/testcase.sh: standard dapp testcase covering the ticket lifecycle on the main chain (which already runs ticket consensus): auto-mining toggle, CreateBindMiner + sign/send, TicketList bound/closed, GetTicketCount, CloseTickets - build.sh now copies cmd/build into build/ci/ticket like other dapps - build_ticket.yml runs make docker-compose dapp=ticket Note: an intermediate attempt enabled COMPOSE_COMPATIBILITY so the jerkinsci container name matched the upstream script's v1-style name; that path was abandoned along with ci_autotest.yml. Co-Authored-By: Claude <[email protected]>
10395bf to
fd5d38f
Compare
manual_make_bin.yml 的 make all-arch 是在 ubuntu 上用 GOOS=windows 交叉编译(CGO_ENABLED=0),只验证能产出 PE 文件,不经过 Windows 原生工具链,也不执行 build.bat。删除 appveyor.yml 后这部分信号缺失。 新增 build_windows.yml,在 windows-2022 runner 上跑 build.bat, 对应原 appveyor 的 test_script。go 版本从 go.mod 读取,不再像 appveyor 那样硬编码 C:\go122;模块化项目无需 GOPATH/clone_folder。 build.bat 用 shell: cmd 调用,PowerShell 下 bat 的非零退出码不能 可靠传播。 Co-Authored-By: Claude Fable 5 <[email protected]>
bysomeone
left a comment
There was a problem hiding this comment.
Review — needs changes before merge
Blocker: build_ticket.yml is green but runs nothing
The ticket integration test (.github/workflows/build_ticket.yml → make docker-compose dapp=ticket → plugin/dapp/ticket/cmd/build/testcase.sh) executes with every helper undefined. chain33_Http, chain33_BlockWait, chain33_SignAndSendTx and RETURN_RESP are defined in build/dapp-test-common.sh, which is only loaded via dapp-test-rpc.sh — and build/docker-compose.sh sources that only when DAPP is empty or paracross, not for dapp=ticket.
Evidence — the ci_ticket job passes (run 33594329867) yet its logs show all ten calls failing:
testcase.sh: line 21: chain33_BlockWait: command not found
testcase.sh: line 25/27/31/32/33/37/41/45/46/50: chain33_Http / chain33_SignAndSendTx: command not found
set +e lets these continue and the script exits 0, so the job is green while SetAutoMining / CreateBindMiner / TicketList / GetTicketCount / CloseTickets never run — this PR's claimed replacement for autotest_tick asserts nothing.
Fix: add source ./dapp-test-common.sh at the top of testcase.sh, then confirm the deploy log shows real API responses (no more command not found).
Suggestions (non-blocking)
- New workflows use
actions/checkout@v3/actions/setup-go@v3(Node 16 deprecated);build_windows.ymlalready uses v4/v5 — unify. on: [push, pull_request]runs the full matrix twice per commit on same-repo branches — consider deduplicating (e.g.pull_requeston the base repo only, or skippushfor branches that also open PRs).
Review feedback: the ticket job added in fd5d38f was green but ran nothing — testcase.sh's helpers (chain33_Http, chain33_SignAndSendTx, RETURN_RESP) are only loaded by docker-compose.sh when DAPP is empty or paracross, so under dapp=ticket every call was "command not found" and set +e let the script exit 0. The same ticket lifecycle assertions already run in build.yml's ci_base job: make docker-compose (no dapp) sources dapp-test-rpc.sh, whose dapp_test_rpc() runs dapptest/ticket/test-rpc.sh separately and fails the job on non-zero exit — the same mechanism that covers relay. So the dedicated job is redundant; remove build_ticket.yml, the now-dead testcase.sh, and restore ticket's build.sh to its pre-fd5d38ff1 state. autotest_tick's removal rationale (unmaintained upstream script, height stays 0) is unaffected. Co-Authored-By: Claude <[email protected]>
Review suggestion: the new workflows mixed Node 16 actions (v3) with build_windows.yml's v4/v5; the rest of the repo (including release.yml at checkout/setup-go v2) was on the same deprecated versions. Upgrade every workflow to checkout@v4 / setup-go@v5 so no workflow depends on the deprecated Node 16 runtime. Mechanical change only; every setup-go block already pins go-version-file so v5's required version input is satisfied. YAML revalidated. Co-Authored-By: Claude <[email protected]>
|
@bysomeone 三条意见的处理:
另外本 PR 新增的 |
Same-repo branches previously ran the full job matrix twice per commit (once for push, once for pull_request synchronize). Adopt the standard dedup pattern: push triggers only on master, pull_request covers all PRs including forks. Behavior after merge is unchanged — master pushes still run every workflow. release.yml already used this pattern; automake.yml (workflow_dispatch) and ci_fork_test.yml (schedule) are unaffected. Co-Authored-By: Claude <[email protected]>
|
补充:第 3 条(push+pull_request 双跑)已在 |
|
发现
建议删掉 |
Same class as the removed build_ticket.yml: relay/cmd/build.sh has had its OUT_DIR/relayd build section commented out since 2021 (739e84e, upstream), so build/ci/relay is never created and `make docker-compose dapp=relay` only prints "dapp=relay not exist or is system dir" before returning 0. Relay's real coverage runs in build.yml's ci_base job via dapptest (relay/test-rpc.sh, copied by the still-active part of build.sh), so no replacement job is needed. This moves the item out of the PR's known leftovers. Co-Authored-By: Claude <[email protected]>
|
确认属实,已删除 |
|
🎉 This PR is included in version 1.71.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
目标
仓库 CI 全部统一到 GitHub Actions:删除 Jenkins / GitLab CI / Travis / AppVeyor 配置,把 Jenkins
ci-plugin管线覆盖的 dapp 迁移到新 workflow,并重新启用被注释掉的make checkgofmt/make linter门槛。变更
1. 迁移遗留 CI(
1c8086515)Jenkinsfile(ci-plugin)、Jenkinsfile-gitlab、.travis.yml、.gitlab-ci.yml、appveyor.ymlci_dapps.yml:接管 Jenkinsrun all实际覆盖但 GH Actions 缺失的 5 个 dapp —— autonomy / bridgevmxgo / evm2 / unfreeze / zksync(矩阵并行,fail-fast: false)ci_fork_test.yml:迁移 GitLab 的 fork_test 系列(schedule 每天一次 + workflow_dispatch,对应原 onceEveryday 门控;forktest all覆盖了原四个任务的超集)2. 修复 golinter.sh 使其真正生效(
9e9942a9c)--skip-dirs=["..."]未加引号,被 golangci-lint 当正则解析成字符类,几乎匹配所有路径 → 全仓被静默跳过,make linter空转(bug 自 2020 年引入)res=$(...)只捕获 stdout,golangci-lint 自身错误走 stderr 被吞掉,配置错误伪装成通过--max-issues-per-linter/--max-same-issues默认截断make linter的 shellcheck 加-S warning(note/info 级不阻断 CI)3. 全仓代码清理(
9ec2c2dcc+cf6bdd085)$?在 echo/条件后被误读、引号缺失、垃圾残行)4. 启用 CI 门槛(
fd295cf07)make checkgofmt和make linter(2025-06 被7c6910a03/ca1288b4e注释)5. 删除冗余的 autotest 模式(
10395bf4f)build.yml的 ci_base(make docker-compose,无 dapp 参数)经 dapptest 机制单独跑plugin/dapp/ticket/cmd/test/test-rpc.sh(CreateBindMiner / SetAutoMining / GetTicketCount / CloseTickets),非零退出会 fail job——与 relay 同机制build_ticket.yml(make docker-compose dapp=ticket),review 指出其 testcase.sh 的 helper 在 dapp=ticket 路径下未加载(docker-compose.sh仅在 DAPP 为空或 paracross 时 sourcedapp-test-rpc.sh),全部调用 command not found 且set +e假绿,已删除6. Windows 原生构建(
9765945a7)build_windows.yml:在 windows-2022 runner 上原生执行build.bat(对应原 appveyor 的 test_script),go 版本从 go.mod 读取manual_make_bin.yml的make all-arch(Linux 交叉编译)互补:交叉编译只验证能产出 PE 文件,不经过 Windows 原生工具链,也不执行 build.bat7. 统一 action 版本(
0f4b7e347,review 建议)actions/checkout升级到 v4、actions/setup-go升级到 v5,不再依赖已废弃的 Node 16 运行时(release.yml 原为 v2,其余原为 v3)8. push/pull_request 去重(
357f4861e,review 建议)9. 删除空转的
build_relay.yml(f2cc11bcb,review 建议)build_ticket.yml同类假绿:relay/cmd/build.sh的 OUT_DIR/relayd 构建段自 2021 年(739e84e44,上游)起整段注释,build/ci/relay不会生成,make docker-compose dapp=relay只打印dapp=relay not exist or is system dir即返回 0relay/test-rpc.sh,由 build.sh 仍生效的部分拷贝),无需替代 job;Makefile 的relay构建目标保留(手动可用)覆盖对账
ci_dapps.ymlbuild.yml各 jobci_fork_test.ymlbuild.yml(唯一缺口是 lint,本次已重新启用)build_windows.yml(Windows 原生跑 build.bat)+manual_make_bin.yml的make all-arch交叉编译产物顺带修复的 bug(均在提交说明中注明)
echo_rst收到 echo 的退出码(恒 0),永远报成功elif [ $? -eq 2 ]分支永不可达fix}_ebrelayer${name}垃圾残行已知遗留(未在本次处理)
autotest_ci/autotest_tick目标保留(手动可用),仅移除 CI 引用🤖 Generated with Claude Code