Skip to content

Commit

Permalink
Fixing inputs on the test step
Browse files Browse the repository at this point in the history
  • Loading branch information
fmacleal committed Jul 18, 2024
1 parent cbefcc7 commit c1e9c68
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ outputs:
runs:
using: docker
image: ./images/Dockerfile
env:
RSKJ_BRANCH: ${{ inputs.rskj-branch }}
POWPEG_NODE_BRANCH: ${{ inputs.powpeg-node-branch }}
RIT_BRANCH: ${{ inputs.rit-branch }}
RIT_LOG_LEVEL: ${{ inputs.rit-log-level }}
args:
- ${{ inputs.rskj-branch }}
- ${{ inputs.powpeg-node-branch }}
- ${{ inputs.rit-branch }}
- ${{ inputs.rit-log-level }}
8 changes: 4 additions & 4 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 "$1"
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 "$2"
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 "$3"
chmod +x ./configure.sh
./configure.sh
./configure_rit_locally.sh "${POWPEG_VERSION}"
export LOG_LEVEL="${INPUT_RIT_LOG_LEVEL}"
export LOG_LEVEL="$4"

echo -e "\n\n--------- Executing Rootstock Integration Tests ---------\n\n"
npm install -y
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,20 @@ jobs:

- name: Test the RIT Container Action
id: test-container
env:
INPUT_RSKJ_BRANCH: master
INPUT_POWPEG_NODE_BRANCH: master
INPUT_RIT_BRANCH: main
INPUT_RIT_LOG_LEVEL: info
run: |
docker run \
--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 }}
docker run \
--env GITHUB_OUTPUT="/github-output" \
-v "$GITHUB_OUTPUT:/github-output" \
--rm ${{ env.TEST_TAG }} \
"${{ env.INPUT_RSKJ_BRANCH }}" \
"${{ env.INPUT_POWPEG_NODE_BRANCH }}" \
${{ env.INPUT_RIT_BRANCH }}" \
"${{ env.INPUT_RIT_LOG_LEVEL }}"
- name: GitHub container registry login
uses: docker/login-action@v3
Expand Down

0 comments on commit c1e9c68

Please sign in to comment.