Skip to content

Commit 2096d8a

Browse files
committed
VED-812: Replicate existing e2e test commands per env.
1 parent 5c8213d commit 2096d8a

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/run-e2e-tests.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
environment: ${{ inputs.environment }}
9292
env:
9393
APIGEE_USERNAME: ${{ vars.APIGEE_USERNAME }}
94+
SOURCE_COMMIT_ID: ${{ github.sha }}
9495
steps:
9596
- name: Connect to AWS
9697
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838
@@ -152,21 +153,33 @@ jobs:
152153
-H "Authorization: Basic $APIGEE_BASIC_AUTH_TOKEN" \
153154
-d "username=$APIGEE_USERNAME&password=$APIGEE_PASSWORD&mfa_token=$CODE&grant_type=password")
154155
155-
token=$(jq -e -r '.access_token' <<<"$response")
156+
token=$(jq -e -r '.access_token' <<< "$response")
156157
echo "::add-mask::$token"
157158
echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV
158159
159-
- name: Run e2e tests
160+
- name: Run proxy deployment e2e test suite
160161
working-directory: e2e
161-
env:
162-
SOURCE_COMMIT_ID: ${{ github.sha }}
163-
run: |
164-
poetry run python -m unittest -c -v
162+
run: poetry run python -m unittest test_deployment
163+
164+
- name: Run proxy e2e test suite
165+
if: ${{ vars.RUN_PROXY_E2E_TESTS == 'true' }}
166+
working-directory: e2e
167+
run: poetry run python -m unittest test_proxy
168+
169+
- name: Run sandbox e2e test suite
170+
if: ${{ vars.RUN_SANDBOX_E2E_TESTS == 'true' }}
171+
working-directory: e2e
172+
run: poetry run python -m unittest test_proxy.TestProxyHealthcheck
173+
174+
- name: Run full e2e test suite
175+
if: ${{ vars.RUN_FULL_E2E_TESTS == 'true' }}
176+
working-directory: e2e
177+
run: poetry run python -m unittest
165178

166179
batch-e2e-tests:
167180
needs: [wait-for-deployment, e2e-tests]
168181
# Only actually depend on wait-for-deployment, but run after e2e-tests
169-
if: ${{ !cancelled() && needs.wait-for-deployment.result == 'success' }}
182+
if: ${{ !cancelled() && needs.wait-for-deployment.result == 'success' && vars.RUN_BATCH_E2E_TESTS == 'true' }}
170183
runs-on: ubuntu-latest
171184
environment: ${{ inputs.environment }}
172185
steps:
@@ -192,7 +205,7 @@ jobs:
192205
working-directory: e2e_batch
193206
run: poetry install --no-root
194207

195-
- name: Run batch e2e tests
208+
- name: Run batch e2e test suite
196209
working-directory: e2e_batch
197210
env:
198211
ENVIRONMENT: ${{ inputs.sub_environment }}

0 commit comments

Comments
 (0)