Skip to content

Commit

Permalink
Fixing the script build again
Browse files Browse the repository at this point in the history
+ Adding some info on the README
  • Loading branch information
fmacleal committed Jul 17, 2024
1 parent dfd9eb4 commit 4d06fa3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Rootstock Integration Tests Action

This action provides a containerized environment for running integration tests on Rootstock.
It receives as inputs the branches of powpeg, rskj and rootstock-integration-tests repositories,
It receives as inputs the branches of `powpeg`, `rskj` and `rootstock-integration-tests` repositories,
checkout at the branches passed as parameters, build the projects and run the integration tests.

The rootstock-integration-tests it's a project that tests the integration between rskj and powpeg-node,
it validates that the peg-in and peg-out processes are working correctly. It's extremely important to both projects,
and should be executed before any release of both projects or any merge to the master/main branch.
and should be executed before any release of both projects or any merge to the master/main branch.

To achieve this and make this test more accessible, we created a container-action created to execute this test,
it offers the flexibility to run the tests with any specific tag or branch from *powpeg-node* or *rskj*.
That way, we will add steps on each repository to run the integration tests with the version that we want to test.
No matter if it's a tag, a branch or a specific commit.

## Inputs

Expand Down
10 changes: 5 additions & 5 deletions .github/images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ set -e
echo -e "\n\n--------- Starting the configuration of rskj ---------\n\n"
cd /usr/src/
git clone https://github.com/rsksmart/rskj.git rskj
cd rskj && git checkout ${INPUT_RSKJ_BRANCH}
cd rskj && git checkout "${INPUT_RSKJ_BRANCH}"
chmod +x ./configure.sh && chmod +x gradlew
./configure.sh

echo -e "\n\n--------- Starting the configuration of powpeg ---------\n\n"
cd /usr/src/
git clone https://github.com/rsksmart/powpeg-node.git powpeg
cp configure_gradle_powpeg.sh powpeg
cd powpeg && git checkout ${INPUT_POWPEG_NODE_BRANCH}
cd powpeg && git checkout "${INPUT_POWPEG_NODE_BRANCH}"
chmod +x ./configure.sh && chmod +x gradlew
POWPEG_VERSION=$(bash configure_gradle_powpeg.sh)
echo "POWPEG_VERSION=$POWPEG_VERSION"
Expand All @@ -27,11 +27,11 @@ mv configure_rit_locally.sh rit
mv regtest.js rit/config/regtest.js
mv /usr/src/logbacks/* /usr/src/rit/logbacks/
cd rit
git checkout ${INPUT_RIT_BRANCH}
git checkout "${INPUT_RIT_BRANCH}"
chmod +x ./configure.sh
./configure.sh
./configure_rit_locally.sh ${POWPEG_VERSION}
export LOG_LEVEL=${INPUT_RIT_LOG_LEVEL}
./configure_rit_locally.sh "${POWPEG_VERSION}"
export LOG_LEVEL="${INPUT_RIT_LOG_LEVEL}"

echo -e "\n\n--------- Executing Rootstock Integration Tests ---------\n\n"
npm install -y
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
id: test-container
run: |
docker run \
--env RSKJ_BRANCH="master" \
--env POWPEG_NODE_BRANCH="master" \
--env INPUT_RSKJ_BRANCH="master" \
--env INPUT_POWPEG_NODE_BRANCH="master" \
--env INPUT_RIT_BRANCH="main" \
--env INPUT_RIT_LOG_LEVEL="info" \
--env "GITHUB_OUTPUT=/github-output" \
-v "$GITHUB_OUTPUT:/github-output" \
--rm ${{ env.TEST_TAG }}
Expand Down

0 comments on commit 4d06fa3

Please sign in to comment.