From b8ea558f148e9399b9fc951b9754c70744bab29e Mon Sep 17 00:00:00 2001 From: Zhihe Li Date: Tue, 16 Jun 2026 14:25:06 -0400 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20Update=20when=20e2e=20test?= =?UTF-8?q?s=20run=20(#3320)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-e2e-admin-ui.yaml | 69 ++++++++++++++++-------- .github/workflows/test-e2e-desktop.yaml | 7 +-- 2 files changed, 51 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test-e2e-admin-ui.yaml b/.github/workflows/test-e2e-admin-ui.yaml index a32c2c606..532957cdf 100644 --- a/.github/workflows/test-e2e-admin-ui.yaml +++ b/.github/workflows/test-e2e-admin-ui.yaml @@ -17,32 +17,57 @@ on: type: string jobs: - test: - name: test + setup: + name: setup matrix # don't need to run e2e tests on ce -> ent merges since tests were already - # run in the ce branch, and there are currently no code diffferences between + # run in the ce branch, and there are currently no code differences between # the two repos if: github.actor != 'hc-github-team-secure-boundary' + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Set matrix + id: set-matrix + run: | + BOUNDARY_BRANCH="${{ github.event.inputs.boundary-branch || 'main' }}" + ENT_BRANCH="${{ github.event.inputs.boundary-enterprise-branch || 'main' }}" + + if [[ "${{ github.repository }}" == "hashicorp/boundary-ui" ]]; then + matrix=$(jq -cn --arg branch "$BOUNDARY_BRANCH" '{ + browser: ["chromium", "firefox", "webkit"], + include: [{ + boundary_edition: "community", + github_repo: "hashicorp/boundary", + folder_name: "boundary", + boundary_edition_short: "oss", + enos_scenario: "e2e_ui_docker", + test_command: "admin:ce:docker", + boundary_branch: $branch + }] + }') + else + matrix=$(jq -cn --arg branch "$ENT_BRANCH" '{ + browser: ["chromium", "firefox", "webkit"], + include: [{ + boundary_edition: "enterprise", + github_repo: "hashicorp/boundary-enterprise", + folder_name: "boundary-enterprise", + boundary_edition_short: "ent", + enos_scenario: "e2e_ui_docker_ent", + test_command: "admin:ent:docker", + boundary_branch: $branch + }] + }') + fi + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" + + test: + name: test + needs: setup runs-on: ${{ fromJSON(vars.RUNNER_UBUNTU_22) }} strategy: - matrix: - boundary_edition: [community, enterprise] - browser: [chromium, firefox, webkit] - include: - - boundary_edition: community - github_repo: hashicorp/boundary - folder_name: boundary - boundary_edition_short: oss - enos_scenario: e2e_ui_docker - test_command: admin:ce:docker - boundary_branch: ${{ github.event.inputs.boundary-branch || 'main' }} - - boundary_edition: enterprise - github_repo: hashicorp/boundary-enterprise - folder_name: boundary-enterprise - boundary_edition_short: ent - enos_scenario: e2e_ui_docker_ent - test_command: admin:ent:docker - boundary_branch: ${{ github.event.inputs.boundary-enterprise-branch || 'main' }} + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} fail-fast: false env: ENOS_VAR_e2e_debug_no_run: true @@ -306,7 +331,7 @@ jobs: - name: Send Slack message on failure uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 - if: ${{ failure() && github.repository == 'hashicorp/boundary-ui' }} + if: ${{ failure() && github.repository == 'hashicorp/boundary-ui-enterprise' }} with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/test-e2e-desktop.yaml b/.github/workflows/test-e2e-desktop.yaml index 61eb4e084..f83ea10c9 100644 --- a/.github/workflows/test-e2e-desktop.yaml +++ b/.github/workflows/test-e2e-desktop.yaml @@ -20,9 +20,10 @@ jobs: test: name: test # don't need to run e2e tests on ce -> ent merges since tests were already - # run in the ce branch, and there are currently no code diffferences between + # run in the ce branch, and there are currently no code differences between # the two repos - if: github.actor != 'hc-github-team-secure-boundary' + # desktop client e2e tests only run enterprise tests, so only run in boundary-ui-enterprise + if: github.actor != 'hc-github-team-secure-boundary' && github.repository == 'hashicorp/boundary-ui-enterprise' runs-on: ${{ fromJSON(vars.RUNNER_UBUNTU_22) }} env: ENOS_VAR_boundary_edition: "ent" @@ -174,7 +175,7 @@ jobs: - name: Send Slack message on failure uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 - if: ${{ failure() && github.repository == 'hashicorp/boundary-ui' }} + if: ${{ failure() && github.repository == 'hashicorp/boundary-ui-enterprise' }} with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }}