From cf1782cdf39644a6f7bab536b72595286fb41aed Mon Sep 17 00:00:00 2001 From: Miguel Angel Rojo Date: Thu, 16 Jan 2025 13:43:02 +0000 Subject: [PATCH] feat: e2e tests on release branches (#946) (#948) * feat: running e2e tests on release branches * feat: added on push condition * feat: added on push condition * feat: added on push condition * feat: added on push condition * feat: added on push condition * feat: added on push condition --- .github/workflows/test-e2e.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-e2e.yaml b/.github/workflows/test-e2e.yaml index c70e0f62c..4df0e6144 100644 --- a/.github/workflows/test-e2e.yaml +++ b/.github/workflows/test-e2e.yaml @@ -38,13 +38,24 @@ jobs: THOR_IMAGE: vechain/thor:${{ github.sha }} name: Run Tests steps: + # Main: https://github.com/vechain/thor-e2e-tests/tree/956b34bcf5b0b072cd7c8fd2e546a9beb66a866a + # For release branches, names in the thor and thor-e2e-tests repos should match + - name: Set e2e repo reference + id: set-ref + run: | + if [[ "${{ github.event.pull_request.base.ref }}" == release/* ]]; then + echo "ref=${{ github.event.pull_request.base.ref }}" >> "$GITHUB_OUTPUT" + elif [[ "${{ github.head_ref }}" == release/* ]]; then + echo "ref=${{ github.head_ref }}" >> "$GITHUB_OUTPUT" + else + echo "ref=956b34bcf5b0b072cd7c8fd2e546a9beb66a866a" >> "$GITHUB_OUTPUT" + fi - name: Checkout uses: actions/checkout@v4 with: repository: vechain/thor-e2e-tests - # https://github.com/vechain/thor-e2e-tests/tree/956b34bcf5b0b072cd7c8fd2e546a9beb66a866a - ref: 956b34bcf5b0b072cd7c8fd2e546a9beb66a866a + ref: ${{ steps.set-ref.outputs.ref }} - name: Download artifact uses: actions/download-artifact@v4