-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the initial version of the action and a worfklow to validate it
- There are some work in progress to tackle, since we need to have an example of how to use the action created. This is ongoing. - Adding results to the action outputs - In order to be able to validate results, we need to pass the test result to outputs from the Github configuration. This commit does it. - Adding the workflow to validate the GH Action - Adding the step to login so we can pull the image - Refactor of CI to build and push using repo credentials - Applying changes from review - Adding the waitTime and maxAttempts configurable with env variables
- Loading branch information
Showing
15 changed files
with
192 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
INCLUDE_CASES=00_00_01-sync.js,01_01_01-pre_orchid_2wp.js | ||
RUN_EACH_TEST_FILE_THESE_TIMES=1 | ||
RUN_ALL_TESTS_THESE_TIMES=1 | ||
|
||
# Amount of time in milliseconds for the `waitForBlock` utility function to wait. | ||
# Configurable because depending on the resources of the machine the tests are running on, the wait time might change. | ||
# In a machine with little resources (CPU, RAM, disk), a small wait time might not be enough because blocks can be mined slow and `waitForBlock` | ||
# might fail with a message like `Block number 800 never reached, last seen was 600`, or `Blockchain not advancing after attempting to find a new block 80 times checking every 200 milliseconds. | ||
# Couldn't reach block number 800. Last block number seen was: 600`. In a machine with enough resources having a high wait time might be a waste of time since the tests would run slower because if this wait time. | ||
# In this case, it can be set to a small value. `200` recommended for most machines with enough resources. `500`, `600`, etc., or more for machine with limited resources. | ||
# Adjust as needed, starting with low values so the tests run as fast as they can. | ||
WAIT_FOR_BLOCK_ATTEMPT_TIME_MILLIS= | ||
|
||
# Max attempts for the `waitForBlock` utility function to 'wait' for the given block, trying to find that block once every `WAIT_FOR_BLOCK_ATTEMPT_TIME_MILLIS`. | ||
# The same as the `WAIT_FOR_BLOCK_ATTEMPT_TIME_MILLIS` variable, the value for this variable could be updated depending on the machine the tests are running on. | ||
# `80` recommended for most machines with enough resources. `160`, `250` or more for machine with limited resources. | ||
# Adjust as needed, starting with low values so the tests run as fast as they can. | ||
WAIT_FOR_BLOCK_MAX_ATTEMPTS= |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Rootstock Integration Tests Action' | ||
description: 'This action provides a containerized environment for running integration tests on Rootstock.' | ||
author: 'Rootstock Labs' | ||
|
||
inputs: | ||
rskj-branch: | ||
description: 'The rskj branch to checkout' | ||
required: false | ||
default: 'master' | ||
federator-branch: | ||
description: 'The federate-node branch to checkout' | ||
required: false | ||
default: 'master' | ||
rit-branch: | ||
description: 'The rootstock-integration-tests branch to checkout' | ||
required: false | ||
default: 'main' | ||
rit-log-level: | ||
description: 'Log level for the rootstock-integration-tests' | ||
required: false | ||
default: 'info' | ||
|
||
outputs: | ||
status: | ||
description: 'The status of the integration tests' | ||
message: | ||
description: 'The output message of the integration tests' | ||
|
||
runs: | ||
using: docker | ||
image: ./images/Dockerfile | ||
env: | ||
RSKJ_BRANCH: ${{ inputs.rskj-branch }} | ||
FEDERATOR_BRANCH: ${{ inputs.federator-branch }} | ||
RIT_BRANCH: ${{ inputs.rit-branch }} | ||
RIT_LOG_LEVEL: ${{ inputs.rit-log-level }} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.