Bridge e2e test #166
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: | |
if: ${{ github.event_name == 'merge_group' }} | |
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: Run Zombienet Test ${{ matrix.test_name }} | |
uses: ./.github/workflow-templates/bridge-e2e | |
- 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 }} |