Skip to content

WIP: Scheduled tests#1690

Closed
franciszekjob wants to merge 38 commits intomove-devnet-client-testsfrom
scheduled-tests
Closed

WIP: Scheduled tests#1690
franciszekjob wants to merge 38 commits intomove-devnet-client-testsfrom
scheduled-tests

Conversation

@franciszekjob
Copy link
Collaborator

@franciszekjob franciszekjob commented Jan 8, 2026

Stack

Closes #1681

Introduced changes

  • Add workflow which dispatches compatibility tests for relevant SDK versions targeting currently supported RPC versions
  • Add compatibility tests

  • This PR contains breaking changes

@franciszekjob franciszekjob changed the title WIP: Add workflows for scheduled tests and dispatcher WIP: Scheduled tests Jan 8, 2026
@franciszekjob franciszekjob changed the base branch from extend-network-tests to move-devnet-client-tests January 8, 2026 11:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces scheduled tests functionality to run network tests against multiple RPC versions, addressing issue #1681. The implementation includes a dispatcher workflow that triggers tests on different SDK repositories with various RPC version configurations.

Changes:

  • Added scheduled tests workflow for running network tests on testnet with configurable RPC versions
  • Added dispatcher workflow to orchestrate test runs across multiple RPC versions and SDK repositories
  • Created a composite action for dispatching workflow runs to target repositories

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/scheduled-tests.yml Defines the test execution workflow with setup and network testing jobs
.github/workflows/scheduled-tests-dispatcher.yml Orchestrates scheduled test runs across multiple RPC versions and repositories
.github/actions/dispatch-scheduled-tests/action.yml Composite action for dispatching workflow runs via GitHub API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +100 to +103
RPC_VERION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERION}"
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in variable name: "RPC_VERION" should be "RPC_VERSION".

Suggested change
RPC_VERION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERION}"
RPC_VERSION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERSION}"

Copilot uses AI. Check for mistakes.
Comment on lines +100 to +103
RPC_VERION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERION}"
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typo in variable name "RPC_VERION" will cause the URL construction to use an empty value. This variable is referenced on line 103 but defined incorrectly on line 100, which will result in an incorrect RPC URL being set.

Suggested change
RPC_VERION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERION}"
RPC_VERSION="${{ inputs.rpc_version }}"
URL="${URL%/}" # Remove trailing slash if any
URL="${URL%/*}" # Get base URL without version
RPC_URL="${URL}/${RPC_VERSION}"

Copilot uses AI. Check for mistakes.
name: Run scheduled tests with multiple RPC versions

on:
pull_request:
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is triggered on pull_request events (line 4), which means it will dispatch scheduled tests to other repositories for every pull request. This could cause excessive workflow runs and consume resources unnecessarily. Consider restricting this to only run on schedule and workflow_dispatch, or add a condition to check if the PR modifies specific files.

Suggested change
pull_request:

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +41
curl -f -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${REPO}/actions/workflows/${WORKFLOW_FILE}/dispatches" \
-d "{\"ref\":\"${REF}\",\"inputs\":{\"rpc_version\":\"${RPC_VERSION}\"}}"

echo "Dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"

Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The curl command lacks error handling context. When the curl command fails (due to -f flag), the error message won't indicate which repository or workflow failed. Consider adding an echo statement before the curl command to log which workflow is being dispatched, or add error handling that provides more context about the failure.

Suggested change
curl -f -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${REPO}/actions/workflows/${WORKFLOW_FILE}/dispatches" \
-d "{\"ref\":\"${REF}\",\"inputs\":{\"rpc_version\":\"${RPC_VERSION}\"}}"
echo "Dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"
echo "Dispatching workflow '${WORKFLOW_FILE}' to repository '${REPO}' at ref '${REF}' with rpc_version='${RPC_VERSION}'"
if ! curl -f -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${REPO}/actions/workflows/${WORKFLOW_FILE}/dispatches" \
-d "{\"ref\":\"${REF}\",\"inputs\":{\"rpc_version\":\"${RPC_VERSION}\"}}"; then
echo "Error: Failed to dispatch workflow '${WORKFLOW_FILE}' to repository '${REPO}' at ref '${REF}' with rpc_version='${RPC_VERSION}'" >&2
exit 1
fi
echo "Successfully dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +41
curl -f -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${REPO}/actions/workflows/${WORKFLOW_FILE}/dispatches" \
-d "{\"ref\":\"${REF}\",\"inputs\":{\"rpc_version\":\"${RPC_VERSION}\"}}"

echo "Dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"

Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The curl command could expose the GitHub token in logs if debugging is enabled. While the token is passed through an environment variable which is generally safe, consider using the GitHub CLI (gh) instead which provides built-in token handling and better security practices. For example: gh workflow run "$WORKFLOW_FILE" --repo "$REPO" --ref "$REF" --field rpc_version="$RPC_VERSION".

Suggested change
curl -f -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${REPO}/actions/workflows/${WORKFLOW_FILE}/dispatches" \
-d "{\"ref\":\"${REF}\",\"inputs\":{\"rpc_version\":\"${RPC_VERSION}\"}}"
echo "Dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"
gh workflow run "${WORKFLOW_FILE}" \
--repo "${REPO}" \
--ref "${REF}" \
--field rpc_version="${RPC_VERSION}"
echo "Dispatched ${REPO}@${REF} workflow ${WORKFLOW_FILE} with rpc_version=${RPC_VERSION}"

Copilot uses AI. Check for mistakes.
@franciszekjob franciszekjob deleted the scheduled-tests branch January 12, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant