Skip to content

Commit

Permalink
WIP test artifact and S3 prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesIC committed Nov 29, 2023
1 parent 0705ab5 commit 0526888
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ jobs:
url: ${{ steps.deploy.outputs.stack-url }}
steps:
- name: Deploy stack
uses: govuk-one-login/github-actions/sam/deploy-stack@b2b6fc5df355031fd08cef37fa13a93670a45899
uses: govuk-one-login/github-actions/sam/deploy-stack@bau-sam-deploy-stack-artifact-path
id: deploy
with:
aws-role-arn: ${{ secrets.DEV_PRE_MERGE_GH_ACTIONS_ROLE_ARN }}
sam-deployment-bucket: ${{ secrets.DEV_PRE_MERGE_ARTIFACT_SOURCE_BUCKET_NAME }}
artifact-name: ${{ needs.build.outputs.artifact-name }}
artifact-path: .aws-sam/build
stack-name-prefix: preview-pdv-matching
delete-failed-stack: true
s3-prefix: pdv-preview
delete-failed-stack: true
pull-repository: true
tags: |
cri:component=check-hmrc-api
Expand Down
44 changes: 38 additions & 6 deletions .github/workflows/pre-merge-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,24 @@ defaults:
working-directory: integration-tests

jobs:
test:
mocked-tests:
runs-on: ubuntu-latest
steps:
- name: Pull repository
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
cache: npm

- name: Install dependencies
run: npm ci --include-workspace-root

- name: Run mocked tests
run: npm run test:mocked -- --config jest.config.ci.ts

aws-test:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand All @@ -20,20 +37,35 @@ jobs:
id-token: write
contents: read
steps:
- name: Checkout code
- name: Build SAM application
uses: govuk-one-login/github-actions/sam/build-application@b2b6fc5df355031fd08cef37fa13a93670a45899
with:
template: infrastructure/template.yaml
pull-repository: true
cache-key: int-tests

- name: Deploy test stack
uses: govuk-one-login/github-actions/sam/deploy-stack@b2b6fc5df355031fd08cef37fa13a93670a45899
with:
aws-role-arn: ${{ secrets.DEV_PRE_MERGE_GH_ACTIONS_ROLE_ARN }}
sam-deployment-bucket: ${{ secrets.DEV_PRE_MERGE_ARTIFACT_SOURCE_BUCKET_NAME }}
stack-name-prefix: preview-pdv-matching
delete-failed-stack: true
s3-prefix: pdv-preview
tags:


- name: Pull repository
uses: actions/checkout@v3

- name: Setup Node.js
- name: Install Node
uses: actions/setup-node@v3
with:
cache: npm

- name: Install dependencies
run: npm ci --include-workspace-root

- name: Run mocked tests
run: npm run test:mocked -- --config jest.config.ci.ts

- name: Assume temporary AWS role
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down

0 comments on commit 0526888

Please sign in to comment.