Skip to content

Change printf to echo for start_script generation #15

Change printf to echo for start_script generation

Change printf to echo for start_script generation #15

Workflow file for this run

# DO NOT MERGE THIS INTO main BRANCH
name: release-test
on:
push:
branches:
- nmv/add-musl-target-to-artifacts
env:
REPO_NAME: ${{ github.repository_owner }}/era-test-node
CARGO_TERM_COLOR: always
jobs:
test-package:
name: validate test release
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build era_test_node_image Docker image
run: |
echo '''
FROM ubuntu:18.04@sha256:dca176c9663a7ba4c1f0e710986f5a25e672842963d95b960191e2d9f7185ebe
RUN apt-get update && \
apt-get install -y wget curl gnupg2 && \
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y libssl1.0.0 cmake pkg-config clang socat
RUN wget https://github.com/matter-labs/era-test-node/releases/download/v0.1.0/era_test_node-v0.1.0-x86_64-unknown-linux-gnu.tar.gz \
&& tar -xzf era_test_node-v0.1.0-x86_64-unknown-linux-gnu.tar.gz \
&& mv era_test_node /usr/local/bin/ \
&& rm era_test_node-v0.1.0-x86_64-unknown-linux-gnu.tar.gz
RUN echo '#!/bin/bash' >> start_script.sh
RUN echo 'socat TCP-LISTEN:"8011",fork,reuseaddr TCP:127.0.0.1:3051 &' >> start_script.sh
RUN echo 'era_test_node --port 3051 run &' >> start_script.sh
RUN echo 'wait' >> start_script.sh
RUN chmod +x /start_script.sh
ENTRYPOINT ["/start_script.sh"]
''' | docker build -t era_test_node_image -
- name: Run era_test_node_image Docker container
run: docker run -d --name era_test_node_container -p 8011:8011 era_test_node_image
- name: Launch tests
id: launch
run: |
echo "Run tests"
make test-e2e
- name: Stop the era_test_node and print output logs
id: stop_node
if: always()
run: |
docker logs era_test_node_container
docker stop era_test_node_container