Bridge e2e test #78
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bridge e2e test | |
on: | |
workflow_run: | |
workflows: [CI] | |
branches: [master] | |
types: [completed] | |
workflow_dispatch: | |
inputs: | |
run_sha: | |
description: "Sha commit from which artifacts are taken" | |
required: true | |
jobs: | |
e2e-bridge-test: | |
runs-on: self-hosted | |
steps: | |
- name: Retrieve run id | |
id: retrieve-run-id | |
run: | | |
if [[ -n "${{ github.event_name == 'workflow_dispatch' }}" ]]; then | |
echo "run_sha=${{ github.event.inputs.run_sha }}" >> $GITHUB_OUTPUT | |
else | |
echo "run_sha=${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT | |
fi | |
- name: Recognize sha ref | |
id: sharef | |
run: | | |
if [ ${{ github.event_name }} == 'pull_request' ] | |
then | |
echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" | |
elif [ ${{ github.event_name }} == 'workflow_run' ] | |
then | |
echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" | |
else | |
echo "::set-output name=sha::$(echo $GITHUB_SHA)" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check g++ | |
id: setup_g_plusplus | |
run: | | |
g++ --version | |
- name: Check protoc | |
id: check_proto_c | |
run: | | |
protoc --version | |
- name: Check jq | |
id: check_jq | |
run: | | |
jq --version | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.22.0' | |
- name: Check go | |
id: check_go | |
run: | | |
go version | |
- name: Run Mage | |
uses: magefile/mage-action@v3 | |
with: | |
install-only: true | |
- name: Check mage | |
id: check_mage | |
run: | | |
mage --version | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Check forge | |
id: check_forge | |
run: | | |
forge --version | |
- name: Pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 9 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Install yarn | |
run: |- | |
curl -fsSL --create-dirs -o $HOME/bin/yarn \ | |
https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js | |
chmod +x $HOME/bin/yarn | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Check yarn | |
id: check_yarn | |
run: | | |
yarn --version | |
- name: Check date | |
id: check_date | |
run: | | |
date --version | |
- name: Check output | |
id: check_output | |
run: | | |
echo ${{ steps.retrieve-run-id.outputs.run_sha }} | |
- name: Download build artifact from triggered workflow | |
uses: dawidd6/action-download-artifact@v7 | |
with: | |
commit: ${{ steps.retrieve-run-id.outputs.run_sha }} | |
workflow: release.yml | |
name: binaries | |
path: target/release | |
allow_forks: false | |
- name: "Make binaries executable" | |
shell: bash | |
run: | | |
chmod uog+x target/release/tanssi-node | |
chmod uog+x target/release/tanssi-relay | |
chmod uog+x target/release/tanssi-relay-prepare-worker | |
chmod uog+x target/release/tanssi-relay-execute-worker | |
chmod uog+x target/release/container-chain-simple-node | |
chmod uog+x target/release/container-chain-frontier-node | |
- name: Run Zombienet Test zombie_tanssi_relay_eth_bridge | |
uses: ./.github/workflow-templates/zombienet-tests | |
with: | |
test_name: zombie_tanssi_relay_eth_bridge | |
- name: Commit Action Status | |
uses: LouisBrunner/[email protected] | |
with: | |
sha: ${{ steps.sharef.outputs.sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Bridge e2e test | |
conclusion: ${{ job.status }} |