1919 description : " Node.js version, set by the CI/CD pipeline workflow"
2020 required : true
2121 type : string
22- pnpm_version :
23- description : " pnpm version, set by the CI/CD pipeline workflow"
24- required : true
25- type : string
2622 python_version :
2723 description : " Python version, set by the CI/CD pipeline workflow"
2824 required : true
3632 required : true
3733 type : string
3834
39- env :
40- AWS_REGION : eu-west-2
41- TERM : xterm-256color
42-
43- permissions :
44- contents : read # This is required for actions/checkout
45-
4635jobs :
47- check-generated-dependencies :
48- name : " Check generated dependencies"
49- runs-on : ubuntu-latest
50- timeout-minutes : 5
51- steps :
52- - name : " Checkout code"
53- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
54- - name : " Setup pnpm"
55- uses : pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
56- with :
57- version : " ${{ inputs.pnpm_version }}"
58- cache : true
59- - name : " Use Node.js"
60- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
61- with :
62- node-version-file : ' .tool-versions'
63- cache : ' pnpm'
64- - name : " Repo setup"
65- run : |
66- pnpm install --frozen-lockfile
67- - name : " Generate dependencies"
68- run : |
69- pnpm run generate-dependencies
70- git diff --exit-code
7136 test-unit :
7237 name : " Unit tests"
7338 runs-on : ubuntu-latest
7439 timeout-minutes : 5
7540 steps :
7641 - name : " Checkout code"
77- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
78- - name : " Setup pnpm"
79- uses : pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
80- with :
81- version : " ${{ inputs.pnpm_version }}"
82- cache : true
83- - name : " Use Node.js"
84- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
85- with :
86- node-version-file : ' .tool-versions'
87- cache : ' pnpm'
88- - name : " Repo setup"
89- run : |
90- pnpm install --frozen-lockfile
91- - name : " Generate dependencies"
92- run : |
93- pnpm run generate-dependencies
42+ uses : actions/checkout@v4
9443 - name : " Run unit test suite"
9544 run : |
9645 make test-unit
9746 - name : " Save the result of fast test suite"
98- uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
99- with :
100- name : unit-tests
101- path : " **/.reports/unit"
102- include-hidden-files : true
103- if : always()
104- - name : " Save the result of code coverage"
105- uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
106- with :
107- name : code-coverage-report
108- path : " .reports/lcov.info"
47+ run : |
48+ echo "Nothing to save"
10949 test-lint :
11050 name : " Linting"
11151 runs-on : ubuntu-latest
11252 timeout-minutes : 5
11353 steps :
11454 - name : " Checkout code"
115- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
116- - name : " Setup pnpm"
117- uses : pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
118- with :
119- version : " ${{ inputs.pnpm_version }}"
120- cache : true
121- - name : " Use Node.js"
122- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
123- with :
124- node-version-file : ' .tool-versions'
125- cache : ' pnpm'
126- - name : " Repo setup"
127- run : |
128- pnpm install --frozen-lockfile
129- - name : " Generate dependencies"
130- run : |
131- pnpm run generate-dependencies
55+ uses : actions/checkout@v4
13256 - name : " Run linting"
13357 run : |
13458 make test-lint
135- test-typecheck :
136- name : " Typecheck"
137- runs-on : ubuntu-latest
138- timeout-minutes : 5
139- steps :
140- - name : " Checkout code"
141- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
142- - name : " Setup pnpm"
143- uses : pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
144- with :
145- version : " ${{ inputs.pnpm_version }}"
146- cache : true
147- - name : " Use Node.js"
148- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
149- with :
150- node-version-file : ' .tool-versions'
151- cache : ' pnpm'
152- - name : " Repo setup"
59+ - name : " Save the linting result"
15360 run : |
154- pnpm install --frozen-lockfile
155- - name : " Generate dependencies"
156- run : |
157- pnpm run generate-dependencies
158- - name : " Run typecheck"
159- run : |
160- make test-typecheck
61+ echo "Nothing to save"
16162 test-coverage :
16263 name : " Test coverage"
16364 needs : [test-unit]
16465 runs-on : ubuntu-latest
16566 timeout-minutes : 5
16667 steps :
16768 - name : " Checkout code"
168- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
69+ uses : actions/checkout@v4
16970 - name : " Run test coverage check"
17071 run : |
17172 make test-coverage
@@ -182,15 +83,11 @@ jobs:
18283 timeout-minutes : 5
18384 steps :
18485 - name : " Checkout code"
185- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
86+ uses : actions/checkout@v4
18687 with :
18788 fetch-depth : 0 # Full history is needed to improving relevancy of reporting
188- - name : " Download coverage report for SONAR"
189- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
190- with :
191- name : code-coverage-report
19289 - name : " Perform static analysis"
193- uses : ./ .github/actions/perform-static-analysis
90+ uses : NHSDigital/nhs-notify-shared-modules/ .github/actions/perform-static-analysis@3.0.0
19491 with :
19592 sonar_organisation_key : " ${{ vars.SONAR_ORGANISATION_KEY }}"
19693 sonar_project_key : " ${{ vars.SONAR_PROJECT_KEY }}"
0 commit comments