Skip to content

Commit 7ec8278

Browse files
committed
NRL-1213 add smoke tests to pr deploy workflow
1 parent 94f08db commit 7ec8278

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/pr-env-deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,53 @@ jobs:
332332

333333
- name: Cleanup Environment Test Data
334334
run: make test-performance-cleanup TF_WORKSPACE_NAME=${{ needs.set-environment-id.outputs.environment_id }}
335+
336+
smoke-test:
337+
name: Run Smoke Tests
338+
needs: [set-environment-id, deploy]
339+
environment: pull-request
340+
runs-on: [self-hosted, ci]
341+
342+
steps:
343+
- name: Git Clone - ${{ github.event.pull_request.head.ref }}
344+
uses: actions/checkout@v4
345+
with:
346+
ref: ${{ github.event.pull_request.head.ref }}
347+
348+
- name: Setup asdf cache
349+
uses: actions/cache@v4
350+
with:
351+
path: ~/.asdf
352+
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
353+
restore-keys: |
354+
${{ runner.os }}-asdf-
355+
356+
- name: Install asdf and tools
357+
uses: asdf-vm/actions/[email protected]
358+
with:
359+
asdf_branch: v0.13.1
360+
361+
- name: Python Dependency Install
362+
run: poetry install --no-root
363+
364+
- name: Configure Management Credentials
365+
uses: aws-actions/configure-aws-credentials@v4
366+
with:
367+
aws-region: eu-west-2
368+
role-to-assume: ${{ secrets.MGMT_ROLE_ARN }}
369+
role-session-name: github-actions-ci-${{ needs.set-environment-id.outputs.environment_id }}
370+
371+
- name: Retrieve Client Certificates
372+
run: make truststore-pull-client ENV=dev
373+
374+
- name: Configure Dev Account Credentials
375+
uses: aws-actions/configure-aws-credentials@v4
376+
with:
377+
aws-region: eu-west-2
378+
role-chaining: true
379+
role-to-assume: ${{ secrets.DEPLOY_ROLE_ARN }}
380+
role-session-name: github-actions-ci-${{ needs.set-environment-id.outputs.environment_id }}
381+
382+
- name: Smoke Test
383+
run: |
384+
make TF_WORKSPACE_NAME=${{ needs.set-environment-id.outputs.environment_id }} test-smoke-internal

0 commit comments

Comments
 (0)