Add CI pipeline, fix validator script error handling, and rewrite RPC tests with assertions#101
Draft
Add CI pipeline, fix validator script error handling, and rewrite RPC tests with assertions#101
Conversation
…RPC tests with pytest Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CI/CD pipeline, monitoring, and error handling for validator scripts
Add CI pipeline, fix validator script error handling, and rewrite RPC tests with assertions
Feb 28, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No CI existed beyond a project-board workflow. Validator update scripts had no error handling, a shared typo, and no download verification. RPC tests only printed responses — they never failed.
CI Pipeline (
.github/workflows/ci.yml)--severity=warning) across all.shfilespython3 -m json.toolfor all.jsonfilesrpc/rpc_test.pywith a 5-minute timeoutpermissions: contents: readValidator Scripts (
update-validator-mainnet.sh,update-validator-testnet.sh)set -euo pipefail— aborts on error, unset variable, or pipeline failuredownload_sunbet_evm→download_subnet_evmin both scripts (definition + call)RPC Tests (
rpc/rpc_test.py)Replaced non-asserting
print()-only functions with proper pytest tests:Added
rpc/requirements.txt(pytest,requests,websockets).ShellCheck Fixes in Pre-existing Scripts
Required to make the new CI job pass:
#!/bin/bashshebang to bothinstall-subnet-cli.shcopies# shellcheck disable=SC2034toapi/env.sh(sourced file)cd ~→cd ~ || exitand quotedtararguments inbackup-validator.shOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.