Skip to content

Commit

Permalink
Adding results to the action outputs
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
fmacleal committed Jun 26, 2024
1 parent 1cad0ca commit b9de331
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
23 changes: 0 additions & 23 deletions .github/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,6 @@ ENV JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-openjdk-amd64" \
RUN export JAVA_HOME=$JAVA_HOME \
&& export PATH="$JAVA_HOME:$PATH"

# -- python ---------------------------------------------------------
ENV PYTHON_VERSION=2.7.16

# Install dependencies
RUN apt-get update \
&& apt-get install -y gcc make openssl libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev \
&& apt-get clean

RUN export PREVIOUS_PATH=$(pwd) \
&& cd /tmp

#Build Python from source
RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar --extract -f Python-$PYTHON_VERSION.tgz \
&& cd ./Python-$PYTHON_VERSION/ \
&& ./configure --with-ensurepip=install --enable-optimizations --prefix=/usr/local \
&& make && make install \
&& cd ../ \
&& rm -r ./Python-$PYTHON_VERSION* \
&& python --version \
&& pip --version \
&& cd $PREVIOUS_PATH

# -- bitcoind ---------------------------------------------------------
ENV BITCOIN_VERSION 0.18.1

Expand Down
14 changes: 12 additions & 2 deletions .github/images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export LOG_LEVEL=$RIT_LOG_LEVEL
echo -e "\n\n--------- Executing Rootstock Integration Tests ---------\n\n"
npm install -y
npm run test-fail-fast
STATUS=$?

# Keep the container running
tail -f /dev/null
if [ $STATUS -ne 0 ]; then
echo -e "\n\n--------- RIT Tests failed ---------\n\n"
MESSAGE="Rootstock Integration Tests Result: FAILED"
else
echo -e "\n\n--------- RIT Tests passed ---------\n\n"
MESSAGE="Rootstock Integration Tests Result: PASSED"
fi

# Write Results to the $GITHUB_OUTPUT file
echo "STATUS=$STATUS" >>"$GITHUB_OUTPUT"
echo "MESSAGE=$MESSAGE" >>"$GITHUB_OUTPUT"
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
with:
install: true
driver-opts: network=host
platforms: linux/amd64,linux/arm64

platforms: linux/amd64

- name: Build the RIT Container
id: build
Expand Down

0 comments on commit b9de331

Please sign in to comment.