From 4d06fa3e556e275f4a0c41f79c2131a8f8ed5922 Mon Sep 17 00:00:00 2001 From: fmacleal Date: Wed, 17 Jul 2024 16:59:41 +0200 Subject: [PATCH] Fixing the script build again + Adding some info on the README --- .github/README.md | 9 +++++++-- .github/images/entrypoint.sh | 10 +++++----- .github/workflows/ci.yml | 6 ++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/README.md b/.github/README.md index 324b9adb..21655e7c 100644 --- a/.github/README.md +++ b/.github/README.md @@ -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 diff --git a/.github/images/entrypoint.sh b/.github/images/entrypoint.sh index f19c0273..3721cf58 100644 --- a/.github/images/entrypoint.sh +++ b/.github/images/entrypoint.sh @@ -5,7 +5,7 @@ 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 @@ -13,7 +13,7 @@ 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" @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a6e7f72..876cb511 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }}