Website: add RPC API documentation with CI validation #10
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: Remote RPC Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # Run daily at 00:30 UTC (offset from GraphQL tests) | |
| - cron: '30 0 * * *' | |
| jobs: | |
| remote-rpc-tests: | |
| name: Test Rust Node RPC Endpoints (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| timeout-minutes: 10 | |
| env: | |
| RPC_ENDPOINT: http://mina-rust-plain-3.gcp.o1test.net | |
| SCRIPT_DIR: .github/scripts/test-rpc-remote | |
| CURL_SCRIPTS: website/docs/developers/api-and-data/scripts/rpc-api/curl | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Make scripts executable | |
| run: | | |
| chmod +x "$SCRIPT_DIR"/*.sh | |
| chmod +x "$CURL_SCRIPTS"/*.sh | |
| - name: Test healthz endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-healthz.sh" "$RPC_ENDPOINT" | |
| - name: Test readyz endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-readyz.sh" "$RPC_ENDPOINT" | |
| - name: Test status endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-status.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test build_env endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-build-env.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test peers endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-peers.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test stats/sync endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-stats-sync.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test snark-pool/jobs endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-snark-pool-jobs.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test snarker/workers endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-snarker-workers.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test snarker/config endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-snarker-config.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test transaction-pool endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-transaction-pool.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test discovery/routing_table endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-discovery-routing-table.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test discovery/bootstrap_stats endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-discovery-bootstrap-stats.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test scan-state/summary endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-scan-state-summary.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test state endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-state.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test message-progress endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-message-progress.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Test accounts endpoint | |
| run: | | |
| "$SCRIPT_DIR/test-accounts.sh" "$RPC_ENDPOINT" "$CURL_SCRIPTS" | |
| - name: Summary | |
| run: | | |
| echo "" | |
| echo "========================================" | |
| echo "RPC Endpoint Tests Complete" | |
| echo "========================================" | |
| echo "Endpoint: $RPC_ENDPOINT" | |
| echo "" | |
| echo "All critical endpoints tested successfully." |