Skip to content

Commit 2deaa4f

Browse files
committed
Simplification following peer review
1 parent b34139a commit 2deaa4f

3 files changed

Lines changed: 6 additions & 30 deletions

File tree

.github/actions/e2e-tests/action.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,17 @@
11
name: E2E tests
22
description: "Run end-to-end tests for this repo"
33

4-
inputs:
5-
pr_number:
6-
required: true
7-
type: string
8-
94
runs:
105
using: "composite"
116

127
steps:
13-
- name: Check if e2e tests should run
14-
id: check_e2e
15-
shell: bash
16-
env:
17-
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
18-
run: |
19-
if [[ -n "${{ inputs.pr_number }}" ]]; then
20-
labels=$(gh pr view "${{ inputs.pr_number }}" --json labels --jq '.labels[].name' 2>/dev/null || echo "")
21-
22-
if echo "$labels" | grep -Fxq 'deploy-proxy'; then
23-
echo "deploy-proxy label found; e2e tests will run."
24-
echo "run_e2e=true" >> $GITHUB_OUTPUT
25-
else
26-
echo "deploy-proxy label not found; e2e tests will be skipped."
27-
echo "run_e2e=false" >> $GITHUB_OUTPUT
28-
fi
29-
else
30-
echo "Not a PR environment; e2e tests will run."
31-
echo "run_e2e=true" >> $GITHUB_OUTPUT
32-
fi
33-
348
- name: Install poetry and e2e test dependencies
35-
if: steps.check_e2e.outputs.run_e2e == 'true'
369
shell: bash
3710
run: |
3811
pipx install poetry
3912
cd tests/e2e-tests && poetry install
4013
4114
- name: Run e2e tests
42-
if: steps.check_e2e.outputs.run_e2e == 'true'
4315
shell: bash
4416
run: |
4517
echo "$INTERNAL_DEV_TEST_PEM" > "${GITHUB_WORKSPACE}/internal-dev-test-1.pem"

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ jobs:
178178
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
179179
version: "${{ needs.metadata.outputs.version }}"
180180
pr_number: ${{ needs.metadata.outputs.pr_number }}
181+
proxy_deployed: "${{ needs.metadata.outputs.deploy_proxy }}"
181182
secrets: inherit
182183
publish-stage: # Recommended maximum execution time is 10 minutes
183184
name: "Publish stage"

.github/workflows/stage-4-acceptance.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ on:
3434
pr_number:
3535
required: true
3636
type: string
37+
proxy_deployed:
38+
description: "True if the APIM proxy was deployed"
39+
required: true
40+
type: string
3741

3842
permissions:
3943
id-token: write
@@ -81,6 +85,7 @@ jobs:
8185
run-e2e-tests:
8286
name: Run End-to-End Tests
8387
runs-on: ubuntu-latest
88+
if: inputs.proxy_deployed == 'true'
8489
steps:
8590
- uses: actions/checkout@v5.0.0
8691

@@ -90,5 +95,3 @@ jobs:
9095
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9196
NON_PROD_API_KEY: ${{ secrets.NON_PROD_API_KEY }}
9297
INTERNAL_DEV_TEST_PEM: ${{ secrets.INTERNAL_DEV_TEST_PEM }}
93-
with:
94-
pr_number: ${{ inputs.pr_number }}

0 commit comments

Comments
 (0)