Skip to content

Commit 5b4703a

Browse files
committed
CCM-10294: use new workflow
1 parent c242b96 commit 5b4703a

File tree

3 files changed

+107
-108
lines changed

3 files changed

+107
-108
lines changed

.github/workflows/dispatch_internal_repo_workflow.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ on:
3838
internalRef:
3939
type: string
4040
description: Internal repo reference (branch or tag)
41-
default: "feature/CCM-10294_standardise-cicd-tests"
41+
default: "main"
4242

4343
permissions:
4444
id-token: write
@@ -58,7 +58,6 @@ jobs:
5858
- name: Trigger nhs-notify-internal workflow
5959
shell: bash
6060
run: |
61-
echo "targetEnvironment=${{ inputs.targetEnvironment }}"
6261
DISPATCH_EVENT=$(jq -ncM \
6362
--arg infraRepoName "${{ inputs.infraRepoName }}" \
6463
--arg releaseVersion ${{ inputs.releaseVersion }} \

.github/workflows/stage-2-test.yaml

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -48,108 +48,108 @@ jobs:
4848
steps:
4949
- name: "Checkout code"
5050
uses: actions/checkout@v4
51-
# - name: "Repo setup"
52-
# run: |
53-
# npm ci
54-
# - name: "Generate dependencies"
55-
# run: |
56-
# npm run generate-dependencies --workspaces --if-present
57-
# git diff --exit-code
58-
# test-unit:
59-
# name: "Unit tests"
60-
# runs-on: ubuntu-latest
61-
# timeout-minutes: 5
62-
# steps:
63-
# - name: "Checkout code"
64-
# uses: actions/checkout@v4
65-
# - name: "Repo setup"
66-
# run: |
67-
# npm ci
68-
# - name: "Generate dependencies"
69-
# run: |
70-
# npm run generate-dependencies --workspaces --if-present
71-
# - name: "Run unit test suite"
72-
# run: |
73-
# make test-unit
74-
# - name: "Save the result of fast test suite"
75-
# uses: actions/upload-artifact@v4
76-
# with:
77-
# name: unit-tests
78-
# path: "**/.reports/unit"
79-
# include-hidden-files: true
80-
# if: always()
81-
# - name: "Save the result of code coverage"
82-
# uses: actions/upload-artifact@v4
83-
# with:
84-
# name: code-coverage-report
85-
# path: ".reports/lcov.info"
86-
# if: always()
87-
# test-lint:
88-
# name: "Linting"
89-
# runs-on: ubuntu-latest
90-
# timeout-minutes: 5
91-
# steps:
92-
# - name: "Checkout code"
93-
# uses: actions/checkout@v4
94-
# - name: "Repo setup"
95-
# run: |
96-
# npm ci
97-
# - name: "Generate dependencies"
98-
# run: |
99-
# npm run generate-dependencies --workspaces --if-present
100-
# - name: "Run linting"
101-
# run: |
102-
# make test-lint
103-
# test-typecheck:
104-
# name: "Typecheck"
105-
# runs-on: ubuntu-latest
106-
# timeout-minutes: 5
107-
# steps:
108-
# - name: "Checkout code"
109-
# uses: actions/checkout@v4
110-
# - name: "Repo setup"
111-
# run: |
112-
# npm ci
113-
# - name: "Generate dependencies"
114-
# run: |
115-
# npm run generate-dependencies --workspaces --if-present
116-
# - name: "Run typecheck"
117-
# run: |
118-
# make test-typecheck
119-
# test-coverage:
120-
# name: "Test coverage"
121-
# needs: [test-unit]
122-
# runs-on: ubuntu-latest
123-
# timeout-minutes: 5
124-
# steps:
125-
# - name: "Checkout code"
126-
# uses: actions/checkout@v4
127-
# - name: "Run test coverage check"
128-
# run: |
129-
# make test-coverage
130-
# - name: "Save the coverage check result"
131-
# run: |
132-
# echo "Nothing to save"
133-
# perform-static-analysis:
134-
# name: "Perform static analysis"
135-
# needs: [test-unit]
136-
# runs-on: ubuntu-latest
137-
# permissions:
138-
# id-token: write
139-
# contents: read
140-
# timeout-minutes: 5
141-
# steps:
142-
# - name: "Checkout code"
143-
# uses: actions/checkout@v4
144-
# with:
145-
# fetch-depth: 0 # Full history is needed to improving relevancy of reporting
146-
# - name: "Download coverage report for SONAR"
147-
# uses: actions/download-artifact@v4
148-
# with:
149-
# name: code-coverage-report
150-
# - name: "Perform static analysis"
151-
# uses: ./.github/actions/perform-static-analysis
152-
# with:
153-
# sonar_organisation_key: "${{ vars.SONAR_ORGANISATION_KEY }}"
154-
# sonar_project_key: "${{ vars.SONAR_PROJECT_KEY }}"
155-
# sonar_token: "${{ secrets.SONAR_TOKEN }}"
51+
- name: "Repo setup"
52+
run: |
53+
npm ci
54+
- name: "Generate dependencies"
55+
run: |
56+
npm run generate-dependencies --workspaces --if-present
57+
git diff --exit-code
58+
test-unit:
59+
name: "Unit tests"
60+
runs-on: ubuntu-latest
61+
timeout-minutes: 5
62+
steps:
63+
- name: "Checkout code"
64+
uses: actions/checkout@v4
65+
- name: "Repo setup"
66+
run: |
67+
npm ci
68+
- name: "Generate dependencies"
69+
run: |
70+
npm run generate-dependencies --workspaces --if-present
71+
- name: "Run unit test suite"
72+
run: |
73+
make test-unit
74+
- name: "Save the result of fast test suite"
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: unit-tests
78+
path: "**/.reports/unit"
79+
include-hidden-files: true
80+
if: always()
81+
- name: "Save the result of code coverage"
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: code-coverage-report
85+
path: ".reports/lcov.info"
86+
if: always()
87+
test-lint:
88+
name: "Linting"
89+
runs-on: ubuntu-latest
90+
timeout-minutes: 5
91+
steps:
92+
- name: "Checkout code"
93+
uses: actions/checkout@v4
94+
- name: "Repo setup"
95+
run: |
96+
npm ci
97+
- name: "Generate dependencies"
98+
run: |
99+
npm run generate-dependencies --workspaces --if-present
100+
- name: "Run linting"
101+
run: |
102+
make test-lint
103+
test-typecheck:
104+
name: "Typecheck"
105+
runs-on: ubuntu-latest
106+
timeout-minutes: 5
107+
steps:
108+
- name: "Checkout code"
109+
uses: actions/checkout@v4
110+
- name: "Repo setup"
111+
run: |
112+
npm ci
113+
- name: "Generate dependencies"
114+
run: |
115+
npm run generate-dependencies --workspaces --if-present
116+
- name: "Run typecheck"
117+
run: |
118+
make test-typecheck
119+
test-coverage:
120+
name: "Test coverage"
121+
needs: [test-unit]
122+
runs-on: ubuntu-latest
123+
timeout-minutes: 5
124+
steps:
125+
- name: "Checkout code"
126+
uses: actions/checkout@v4
127+
- name: "Run test coverage check"
128+
run: |
129+
make test-coverage
130+
- name: "Save the coverage check result"
131+
run: |
132+
echo "Nothing to save"
133+
perform-static-analysis:
134+
name: "Perform static analysis"
135+
needs: [test-unit]
136+
runs-on: ubuntu-latest
137+
permissions:
138+
id-token: write
139+
contents: read
140+
timeout-minutes: 5
141+
steps:
142+
- name: "Checkout code"
143+
uses: actions/checkout@v4
144+
with:
145+
fetch-depth: 0 # Full history is needed to improving relevancy of reporting
146+
- name: "Download coverage report for SONAR"
147+
uses: actions/download-artifact@v4
148+
with:
149+
name: code-coverage-report
150+
- name: "Perform static analysis"
151+
uses: ./.github/actions/perform-static-analysis
152+
with:
153+
sonar_organisation_key: "${{ vars.SONAR_ORGANISATION_KEY }}"
154+
sonar_project_key: "${{ vars.SONAR_PROJECT_KEY }}"
155+
sonar_token: "${{ secrets.SONAR_TOKEN }}"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
jobName: Acceptance tests
5858
infraRepoName: nhs-notify-web-template-management
5959
releaseVersion: ${{ github.head_ref || github.ref_name }}
60-
targetWorkflow: dispatch-acceptance-tests-dynamic-env.yaml
60+
targetWorkflow: dispatch-contextual-tests-dynamic-env.yaml
6161
targetEnvironment: ${{ needs.generate-sandbox-name.outputs.SANDBOX_NAME }}
6262
targetAccountGroup: nhs-notify-template-management-dev
6363
targetComponent: sandbox

0 commit comments

Comments
 (0)