ci: add spec-tests sync workflows#610
Conversation
Adds GitHub Actions workflows to automatically sync generated spec test JSON files to a dedicated spec-tests repository on PR open and merge. - generate-spec-tests composite action: sets up Go, runs generators for ssv/qbft/types spectests, copies output to ../spec-tests - sync-spec-tests-pr: on PR open/sync, pushes generated files to a matching branch in spec-tests repo and creates/updates a PR - sync-spec-tests-merge: on push to main, regenerates files and merges the corresponding spec-tests PR - test.yaml: bumped to ubuntu-24.04, node24-compatible action versions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR introduces GitHub Actions workflows to automatically sync generated spec-test JSON files from
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant SSV as ssv-spec (GitHub)
participant GHA as GitHub Actions
participant ST as spec-tests repo
Dev->>SSV: Open / push to PR branch
SSV->>GHA: Trigger sync-spec-tests-pr
GHA->>GHA: checkout + go generate (ssv/qbft/types)
GHA->>GHA: Get GitHub App token
GHA->>ST: git clone spec-tests
GHA->>ST: git checkout -B {branch} origin/{base}
GHA->>ST: cp generated files + git commit
GHA->>ST: git push --force origin {branch}
GHA->>ST: gh pr create / gh pr edit
Dev->>SSV: Merge PR to main
SSV->>GHA: Trigger sync-spec-tests-merge
GHA->>GHA: checkout + go generate (ssv/qbft/types)
GHA->>SSV: gh api commits/{SHA}/pulls → PR number + head_ref
GHA->>GHA: Get GitHub App token
GHA->>ST: git clone spec-tests
GHA->>ST: git checkout -B {branch} origin/{branch}
GHA->>ST: cp final generated files + git commit
GHA->>ST: git push --force origin {branch}
GHA->>ST: gh pr merge {spec-tests PR} --merge --delete-branch
Reviews (1): Last reviewed commit: "ci: add spec-tests sync workflows" | Re-trigger Greptile |
|
Thanks @vaclav-ssvlabs
Codex:
At Probably non issue but still pasting: At |
|
Hey @vaclav-ssvlabs after the known issues, there may be more. I recommend the following:
wdyt? I also opened #619 to fix the no changes edge case. Codex claims the greptile bug is a non-issue, but we should verify. |
Resolve no test has changed edge case
Move jsons to spec-tests repo
Summary
Adds GitHub Actions workflows to automatically sync generated spec test JSON files to the dedicated
spec-testsrepository.generate-spec-testscomposite action: sets up Go, runs generators forssv/qbft/typesspectests, copies output to../spec-testssync-spec-tests-pr: on PR open/synchronize, pushes generated files to a matching branch in spec-tests repo and creates/updates a mirrored PRsync-spec-tests-merge: on push tomain, regenerates files and merges the corresponding spec-tests PRtest.yaml: bumped toubuntu-24.04, node24-compatible action versionsNotes