Skip to content

Commit 63e67bc

Browse files
VIA-598 AJ/DB WIP add contract tests to scheduled assurance
1 parent 191935c commit 63e67bc

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.github/actions/deploy/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
# - why? given we reuse preprod for R1.0 and R2.0, when IAM permission change across releases, then deployment fails
3030
# - constraint? make sure R2.0 IAM permissions are a superset of R1.0 IAM permissions
3131
# - what? deploy IAM from R2.0 as it is a superset and then R1.0 deployments will succeed as well
32-
- name: "Checkout code"
32+
- name: "Checkout main branch"
3333
uses: actions/checkout@v5
3434
with:
3535
ref: 'main'
@@ -80,7 +80,7 @@ runs:
8080
# Download the required artefacts from AWS
8181
#################################################
8282

83-
- name: "Checkout code"
83+
- name: "Checkout target code"
8484
uses: actions/checkout@v5
8585
with:
8686
ref: ${{ inputs.tag_or_sha_to_deploy }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: run-contract-tests
2+
description: "Run contract tests"
3+
4+
inputs:
5+
target_ref:
6+
description: "Target ref to run tests on"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
#################################################
13+
# Run contract tests
14+
#################################################
15+
16+
- name: "Checkout target code"
17+
uses: actions/checkout@v5
18+
with:
19+
ref: ${{ inputs.target_ref }}
20+
path: "code-for-contract-tests"
21+
22+
- name: "Cache node modules"
23+
uses: actions/cache@v4
24+
env:
25+
cache-name: cache-node-modules
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./code-for-contract-tests/**/package-lock.json') }}
29+
30+
- name: "Install dependencies"
31+
shell: bash
32+
working-directory: "./code-for-contract-tests"
33+
run: |
34+
npm ci --ignore-scripts
35+
36+
- name: "Run contract tests ${{inputs.environment}}"
37+
shell: bash
38+
working-directory: "./code-for-contract-tests"
39+
run: |
40+
npm run contract

.github/workflows/cicd-9-scheduled-wip.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "CI/CD scheduled assurances WIP"
22

33
on:
44
schedule:
5-
- cron: '22 15 * * MON-FRI' # Runs at 09:30 UTC every weekday
5+
- cron: '30 9 * * MON-FRI' # Runs at 09:30 UTC every weekday
66
workflow_dispatch:
77
inputs:
88
release:
@@ -53,6 +53,12 @@ jobs:
5353
secret_aws_iam_role: ${{ secrets.IAM_ROLE }}
5454
secret_aws_slack_channel_id: ${{ secrets.ALARMS_SLACK_CHANNEL_ID }}
5555

56+
- name: "Run contract tests (sandpit+mocked)"
57+
timeout-minutes: 10
58+
uses: ./.github/actions/run-contract-tests
59+
with:
60+
target_ref: ${{ steps.get-latest-tag-name.outputs.value }}
61+
5662
deploy-and-test-main:
5763
name: "Main Branch Assurance"
5864
runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)