Skip to content

Commit 9866f60

Browse files
CCM-11990 Workflow fixes (#80)
* CCM-11990 Workflow fixes * CCM-11990 Workflow fixes * CCM-1190 adding a test for amplify CI * CCM-11990 adding a test for amplify CI
1 parent 36edf4d commit 9866f60

5 files changed

Lines changed: 35 additions & 10 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66
push:
77
branches:
88
- "**"
9-
pull_request:
10-
types: [opened, reopened]
11-
branches:
12-
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
12+
cancel-in-progress: false
13+
14+
permissions:
15+
id-token: write
16+
contents: read
1317

1418
jobs:
1519
metadata:

.github/workflows/pr_closed.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,4 @@ jobs:
6060
--targetEnvironment "main" \
6161
--targetAccountGroup "nhs-notify-client-config-dev" \
6262
--targetComponent "${{ matrix.component }}" \
63-
--terraformAction "apply" \
64-
--overrideProjectName "nhs" \
65-
--overrideRoleName "nhs-main-acct-client-config-github-deploy"
63+
--terraformAction "apply"

.github/workflows/stage-1-commit.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
required: true
3333
type: string
3434

35+
permissions:
36+
id-token: write
37+
contents: read
38+
3539
jobs:
3640
scan-secrets:
3741
name: "Scan secrets"
@@ -71,11 +75,9 @@ jobs:
7175
runs-on: ubuntu-latest
7276
needs: detect-terraform-changes
7377
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
74-
permissions:
75-
contents: write
7678
steps:
7779
- name: "Checkout code"
78-
uses: actions/checkout@v5
80+
uses: actions/checkout@v4
7981
with:
8082
fetch-depth: 0 # Full history is needed to compare branches
8183
- name: "Check to see if Terraform Docs are up-to-date"

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,18 @@ on:
2727
description: "Terraform version, set by the CI/CD pipeline workflow"
2828
required: true
2929
type: string
30+
pr_number:
31+
required: true
32+
type: string
3033
version:
3134
description: "Version of the software, set by the CI/CD pipeline workflow"
3235
required: true
3336
type: string
3437

38+
permissions:
39+
id-token: write
40+
contents: read
41+
3542
jobs:
3643
environment-set-up:
3744
name: "Environment set up"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { render, screen } from '@testing-library/react';
2+
import Page from '../../app/page';
3+
4+
describe('Home page', () => {
5+
it('renders the Hello World heading', () => {
6+
render(<Page />);
7+
expect(screen.getByRole('heading', { name: /hello world/i })).toBeInTheDocument();
8+
});
9+
10+
it('renders a main landmark', () => {
11+
render(<Page />);
12+
expect(screen.getByRole('main')).toBeInTheDocument();
13+
});
14+
});

0 commit comments

Comments
 (0)