@defra/forms-engine-plugin 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/.public/assets/fonts/bold-affa96571d-v2.woff +0 -0
  2. package/.public/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  3. package/.public/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  4. package/.public/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  5. package/.public/assets/images/favicon.ico +0 -0
  6. package/.public/assets/images/favicon.svg +1 -0
  7. package/.public/assets/images/govuk-crest.svg +1 -0
  8. package/.public/assets/images/govuk-icon-180.png +0 -0
  9. package/.public/assets/images/govuk-icon-192.png +0 -0
  10. package/.public/assets/images/govuk-icon-512.png +0 -0
  11. package/.public/assets/images/govuk-icon-mask.svg +1 -0
  12. package/.public/assets/images/govuk-opengraph-image.png +0 -0
  13. package/.public/assets/manifest.json +39 -0
  14. package/.public/assets-manifest.json +24 -0
  15. package/.public/javascripts/application.0fd8c18.min.js +3 -0
  16. package/.public/javascripts/application.0fd8c18.min.js.LICENSE.txt +58 -0
  17. package/.public/javascripts/application.0fd8c18.min.js.map +1 -0
  18. package/.public/javascripts/file-upload.b2f18f5.min.js +2 -0
  19. package/.public/javascripts/file-upload.b2f18f5.min.js.map +1 -0
  20. package/.public/javascripts/vendor/accessible-autocomplete.275d332.min.js +2 -0
  21. package/.public/javascripts/vendor/accessible-autocomplete.275d332.min.js.map +1 -0
  22. package/.public/stylesheets/application.e340021.min.css +14 -0
  23. package/.public/stylesheets/application.e340021.min.css.map +1 -0
  24. package/package.json +7 -2
  25. package/.browserslistrc +0 -16
  26. package/.editorconfig +0 -9
  27. package/.eslintrc.cjs +0 -266
  28. package/.github/dependabot.yml +0 -85
  29. package/.github/workflows/check-pull-request.yml +0 -209
  30. package/.github/workflows/pr-notifier.yml +0 -98
  31. package/.github/workflows/publish.yml +0 -111
  32. package/.husky/pre-commit +0 -1
  33. package/.lintstagedrc.js +0 -4
  34. package/.nvmrc +0 -1
  35. package/.prettierignore +0 -8
  36. package/.prettierrc.cjs +0 -26
  37. package/Dockerfile +0 -61
  38. package/Procfile +0 -1
  39. package/babel.config.cjs +0 -55
  40. package/compose/aws.env +0 -4
  41. package/compose/start-localstack.sh +0 -26
  42. package/docker-compose.yaml +0 -86
  43. package/globals.d.ts +0 -1
  44. package/jest.config.cjs +0 -54
  45. package/jest.environment.js +0 -4
  46. package/jest.setup.cjs +0 -14
  47. package/postcss.config.js +0 -26
  48. package/sonar-project.properties +0 -17
  49. package/stylelint.config.js +0 -10
  50. package/test/client/javascripts/file-upload.test.js +0 -1197
  51. package/test/condition/checkboxes.test.js +0 -112
  52. package/test/condition/radios.test.js +0 -112
  53. package/test/condition/text.test.js +0 -103
  54. package/test/fixtures/assets-manifest.json +0 -4
  55. package/test/fixtures/form.js +0 -86
  56. package/test/fixtures/index.js +0 -2
  57. package/test/fixtures/list.js +0 -92
  58. package/test/form/cookies.test.js +0 -338
  59. package/test/form/csrf.test.js +0 -87
  60. package/test/form/definitions/basic.js +0 -101
  61. package/test/form/definitions/blank.js +0 -10
  62. package/test/form/definitions/checkboxes.json +0 -88
  63. package/test/form/definitions/components.json +0 -452
  64. package/test/form/definitions/conditional-reveal.js +0 -140
  65. package/test/form/definitions/conditions-basic.js +0 -187
  66. package/test/form/definitions/conditions-complex.js +0 -338
  67. package/test/form/definitions/conditions-dates.js +0 -78
  68. package/test/form/definitions/conditions-escaping.js +0 -143
  69. package/test/form/definitions/demo-cph-number.js +0 -3099
  70. package/test/form/definitions/feedback.json +0 -45
  71. package/test/form/definitions/fields-optional.js +0 -402
  72. package/test/form/definitions/fields-required.js +0 -402
  73. package/test/form/definitions/file-upload-basic.js +0 -44
  74. package/test/form/definitions/file-upload.js +0 -66
  75. package/test/form/definitions/minimal.js +0 -39
  76. package/test/form/definitions/phase-alpha.json +0 -33
  77. package/test/form/definitions/phase-default.json +0 -26
  78. package/test/form/definitions/radios.json +0 -88
  79. package/test/form/definitions/repeat-mixed.js +0 -54
  80. package/test/form/definitions/repeat.js +0 -70
  81. package/test/form/definitions/status.json +0 -126
  82. package/test/form/definitions/templates.js +0 -183
  83. package/test/form/definitions/test.json +0 -581
  84. package/test/form/definitions/text.json +0 -75
  85. package/test/form/definitions/titles.json +0 -170
  86. package/test/form/definitions.test.js +0 -47
  87. package/test/form/exit-page.test.js +0 -210
  88. package/test/form/feedback.test.js +0 -68
  89. package/test/form/fields-optional.test.js +0 -237
  90. package/test/form/fields-required.test.js +0 -294
  91. package/test/form/file-upload.test.js +0 -313
  92. package/test/form/govuk-notify.test.js +0 -449
  93. package/test/form/journey-basic.test.js +0 -444
  94. package/test/form/persist-files.test.js +0 -227
  95. package/test/form/phase-banner.test.js +0 -71
  96. package/test/form/repeat.test.js +0 -628
  97. package/test/form/summary-submission-email.test.js +0 -95
  98. package/test/form/template.test.js +0 -288
  99. package/test/form/titles.test.js +0 -204
  100. package/test/helpers/component-helpers.js +0 -74
  101. package/test/utils/get-cookie.js +0 -42
  102. package/test/utils/get-form-definitions.js +0 -18
  103. package/tmp.pdf +0 -1
  104. package/tsconfig.json +0 -28
  105. package/webpack.config.js +0 -208
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@defra/forms-engine-plugin",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Defra forms engine",
5
5
  "type": "module",
6
6
  "main": ".server/server/plugins/engine/index.js",
7
+ "files": [
8
+ ".server",
9
+ ".public",
10
+ "src"
11
+ ],
7
12
  "scripts": {
8
13
  "build": "npm run build:server && npm run build:client",
9
14
  "build:client": "NODE_ENV=${NODE_ENV:-production} webpack",
@@ -78,6 +83,7 @@
78
83
  "lodash": "^4.17.21",
79
84
  "marked": "^15.0.6",
80
85
  "nunjucks": "^3.2.3",
86
+ "outdent": "^0.8.0",
81
87
  "pino": "^9.6.0",
82
88
  "pino-pretty": "^13.0.0",
83
89
  "proxy-agent": "^6.5.0",
@@ -142,7 +148,6 @@
142
148
  "jest-extended": "^4.0.2",
143
149
  "jsdom": "^25.0.1",
144
150
  "lint-staged": "^15.3.0",
145
- "outdent": "^0.8.0",
146
151
  "postcss": "^8.4.49",
147
152
  "postcss-load-config": "^6.0.1",
148
153
  "postcss-loader": "^8.1.1",
package/.browserslistrc DELETED
@@ -1,16 +0,0 @@
1
- [javascripts]
2
- supports es6-module
3
-
4
- [stylesheets]
5
- > 0.1% in GB and not dead
6
- last 6 Chrome versions
7
- last 6 Firefox versions
8
- last 6 Edge versions
9
- last 2 Samsung versions
10
- Firefox ESR
11
- Safari >= 11
12
- iOS >= 11
13
- ie 11
14
-
15
- [node]
16
- node 22
package/.editorconfig DELETED
@@ -1,9 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- indent_style = space
6
- indent_size = 2
7
- end_of_line = lf
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
package/.eslintrc.cjs DELETED
@@ -1,266 +0,0 @@
1
- /**
2
- * ESLint config
3
- * @type {import('eslint').ESLint.ConfigData}
4
- */
5
- module.exports = {
6
- ignorePatterns: ['.public', '.server', 'coverage'],
7
- overrides: [
8
- {
9
- extends: [
10
- 'standard',
11
- 'eslint:recommended',
12
- 'plugin:import/recommended',
13
- 'plugin:import/typescript',
14
- 'plugin:jsdoc/recommended',
15
- 'plugin:n/recommended',
16
- 'plugin:promise/recommended',
17
- 'plugin:@typescript-eslint/strict-type-checked',
18
- 'plugin:@typescript-eslint/stylistic-type-checked',
19
- 'prettier'
20
- ],
21
- files: ['**/*.{cjs,js,mjs,ts}'],
22
- parser: '@typescript-eslint/parser',
23
- parserOptions: {
24
- ecmaVersion: 'latest',
25
- projectService: true,
26
- tsconfigRootDir: __dirname
27
- },
28
- plugins: ['@typescript-eslint', 'import', 'jsdoc', 'n', 'promise'],
29
- rules: {
30
- 'no-console': 'error',
31
- 'no-irregular-whitespace': [
32
- 'error',
33
- {
34
- skipTemplates: true
35
- }
36
- ],
37
-
38
- // Check type imports are identified
39
- '@typescript-eslint/consistent-type-imports': [
40
- 'error',
41
- {
42
- fixStyle: 'inline-type-imports'
43
- }
44
- ],
45
-
46
- // Allow void return shorthand in arrow functions
47
- '@typescript-eslint/no-confusing-void-expression': [
48
- 'error',
49
- {
50
- ignoreArrowShorthand: true
51
- }
52
- ],
53
-
54
- // Only show warnings for missing types
55
- '@typescript-eslint/no-unsafe-argument': 'warn',
56
- '@typescript-eslint/no-unsafe-assignment': 'warn',
57
- '@typescript-eslint/no-unsafe-call': 'warn',
58
- '@typescript-eslint/no-unsafe-member-access': 'warn',
59
- '@typescript-eslint/no-unsafe-return': 'warn',
60
-
61
- // Check type support for template string implicit `.toString()`
62
- '@typescript-eslint/restrict-template-expressions': [
63
- 'error',
64
- {
65
- allowBoolean: true,
66
- allowNumber: true
67
- }
68
- ],
69
-
70
- // Skip warnings for `this` in static methods
71
- '@typescript-eslint/unbound-method': [
72
- 'warn',
73
- {
74
- ignoreStatic: true
75
- }
76
- ],
77
-
78
- // Skip rules handled by TypeScript compiler
79
- 'import/default': 'off',
80
- 'import/extensions': 'off',
81
- 'import/named': 'off',
82
- 'import/namespace': 'off',
83
- 'import/no-named-as-default': 'off',
84
- 'import/no-named-as-default-member': 'off',
85
- 'import/no-unresolved': 'off',
86
-
87
- // Check type imports are annotated inline
88
- 'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
89
-
90
- // Check import or require statements are A-Z ordered
91
- 'import/order': [
92
- 'error',
93
- {
94
- alphabetize: { order: 'asc' },
95
- named: {
96
- enabled: true,
97
- types: 'types-last'
98
- },
99
- 'newlines-between': 'always'
100
- }
101
- ],
102
-
103
- // Check relative import paths use aliases
104
- 'no-restricted-imports': [
105
- 'error',
106
- {
107
- patterns: [
108
- {
109
- group: ['./', '../'],
110
- message: "Please use '~/*' import alias instead."
111
- }
112
- ]
113
- }
114
- ],
115
-
116
- // Check for valid formatting
117
- 'jsdoc/check-line-alignment': [
118
- 'warn',
119
- 'never',
120
- {
121
- tags: ['param', 'property', 'typedef', 'returns']
122
- }
123
- ],
124
-
125
- // Require hyphens before param description
126
- // Aligns with TSDoc style: https://tsdoc.org/pages/tags/param/
127
- 'jsdoc/require-hyphen-before-param-description': [
128
- 'warn',
129
- 'always',
130
- {
131
- tags: {
132
- param: 'always',
133
- property: 'always',
134
- returns: 'never'
135
- }
136
- }
137
- ],
138
-
139
- // JSDoc blocks are optional but must be valid
140
- 'jsdoc/require-jsdoc': [
141
- 'error',
142
- {
143
- enableFixer: false,
144
- require: {
145
- FunctionDeclaration: false
146
- }
147
- }
148
- ],
149
-
150
- // JSDoc @param is optional
151
- 'jsdoc/require-param-description': 'off',
152
- 'jsdoc/require-param-type': 'off',
153
- 'jsdoc/require-param': 'off',
154
-
155
- // JSDoc @returns is optional
156
- 'jsdoc/require-returns-description': 'off',
157
- 'jsdoc/require-returns-type': 'off',
158
- 'jsdoc/require-returns': 'off',
159
-
160
- // Skip rules handled by TypeScript compiler
161
- 'n/no-extraneous-require': 'off',
162
- 'n/no-extraneous-import': 'off',
163
- 'n/no-missing-require': 'off',
164
- 'n/no-missing-import': 'off',
165
-
166
- // Prefer rules that are type aware
167
- 'no-unused-vars': 'off',
168
- 'no-use-before-define': 'off',
169
- '@typescript-eslint/no-unused-vars': [
170
- 'error',
171
- { argsIgnorePattern: '^_' }
172
- ],
173
- '@typescript-eslint/no-use-before-define': ['error', 'nofunc']
174
- },
175
- settings: {
176
- 'import/parsers': {
177
- '@typescript-eslint/parser': ['.cjs', '.js', '.mjs', '.ts']
178
- },
179
- 'import/resolver': {
180
- node: true,
181
- typescript: true
182
- }
183
- }
184
- },
185
- {
186
- extends: ['plugin:jsdoc/recommended-typescript-flavor'],
187
- files: ['**/*.{cjs,js,mjs}'],
188
- plugins: ['jsdoc'],
189
- rules: {
190
- // Promise.prototype.catch() errors cannot be typed in JavaScript
191
- '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
192
-
193
- // JSDoc blocks are optional but must be valid
194
- 'jsdoc/require-jsdoc': [
195
- 'error',
196
- {
197
- enableFixer: false,
198
- require: {
199
- FunctionDeclaration: false
200
- }
201
- }
202
- ],
203
-
204
- // JSDoc @param types are mandatory for JavaScript
205
- 'jsdoc/require-param-description': 'off',
206
- 'jsdoc/require-param-type': 'error',
207
- 'jsdoc/require-param': 'off',
208
-
209
- // JSDoc @returns is optional
210
- 'jsdoc/require-returns-description': 'off',
211
- 'jsdoc/require-returns-type': 'off',
212
- 'jsdoc/require-returns': 'off'
213
- }
214
- },
215
- {
216
- files: ['**/*.cjs'],
217
- rules: {
218
- '@typescript-eslint/no-var-requires': 'off'
219
- }
220
- },
221
- {
222
- files: ['**/*.{js,mjs}'],
223
- parserOptions: {
224
- sourceType: 'module'
225
- }
226
- },
227
- {
228
- env: {
229
- browser: true,
230
- node: false
231
- },
232
- files: ['src/client/**/*.js'],
233
- rules: {
234
- // Turn off warnings for unavailable types
235
- // https://github.com/alphagov/govuk-frontend/issues/2835
236
- '@typescript-eslint/no-unsafe-argument': 'off',
237
- '@typescript-eslint/no-unsafe-assignment': 'off',
238
- '@typescript-eslint/no-unsafe-call': 'off',
239
- '@typescript-eslint/no-unsafe-member-access': 'off',
240
- '@typescript-eslint/no-unsafe-return': 'off',
241
-
242
- // Allow floating promises for lazy loading
243
- '@typescript-eslint/no-floating-promises': 'off',
244
- 'promise/always-return': 'off'
245
- }
246
- },
247
- {
248
- env: {
249
- 'jest/globals': true
250
- },
251
- extends: ['plugin:jest/recommended', 'plugin:jest/style'],
252
- files: ['**/*.test.{cjs,js,mjs,ts}'],
253
- plugins: ['jest'],
254
- rules: {
255
- // Turn off warnings for jest.Expect 'any' types
256
- '@typescript-eslint/no-unsafe-assignment': 'off',
257
- '@typescript-eslint/no-unsafe-argument': 'off',
258
-
259
- // Allow Jest to assert on mocked unbound methods
260
- '@typescript-eslint/unbound-method': 'off',
261
- 'jest/unbound-method': 'error'
262
- }
263
- }
264
- ],
265
- root: true
266
- }
@@ -1,85 +0,0 @@
1
- version: 2
2
-
3
- updates:
4
- # Update npm packages
5
- - package-ecosystem: npm
6
- directory: /
7
- open-pull-requests-limit: 10
8
-
9
- # Group into shared PRs
10
- groups:
11
- build:
12
- patterns:
13
- - '*-loader'
14
- - '*-webpack-plugin'
15
- - '@babel/*'
16
- - 'autoprefixer'
17
- - 'babel-*'
18
- - 'core-js'
19
- - 'cssnano'
20
- - 'cssnano-*'
21
- - 'postcss'
22
- - 'postcss-*'
23
- - 'sass-embedded'
24
- - 'tsc-alias'
25
- - 'typescript'
26
- - 'webpack'
27
- - 'webpack-*'
28
-
29
- # Exclude packages in other groups
30
- exclude-patterns:
31
- - 'postcss-scss'
32
-
33
- lint:
34
- patterns:
35
- - '@typescript-eslint/*'
36
- - 'editorconfig-checker'
37
- - 'eslint'
38
- - 'eslint-*'
39
- - 'husky'
40
- - 'lint-staged'
41
- - 'postcss-scss'
42
- - 'prettier'
43
- - 'stylelint'
44
- - 'stylelint-*'
45
-
46
- logging:
47
- patterns:
48
- - '*-pino'
49
- - '*-pino-format'
50
- - 'pino'
51
- - 'pino-*'
52
-
53
- tools:
54
- patterns:
55
- - 'concurrently'
56
- - 'global-jsdom'
57
- - 'jest'
58
- - 'jsdom'
59
- - 'tsx'
60
-
61
- types:
62
- patterns:
63
- - '@types/*'
64
-
65
- # Schedule run every Monday, local time
66
- schedule:
67
- interval: weekly
68
- time: '10:30'
69
- timezone: 'Europe/London'
70
-
71
- versioning-strategy: increase
72
-
73
- allow:
74
- # Include direct package.json updates
75
- - dependency-type: direct
76
-
77
- # Update GitHub Actions
78
- - package-ecosystem: github-actions
79
- directory: /
80
-
81
- # Schedule run every Monday, local time
82
- schedule:
83
- interval: weekly
84
- time: '10:30'
85
- timezone: 'Europe/London'
@@ -1,209 +0,0 @@
1
- name: Check Pull Request
2
-
3
- on:
4
- pull_request:
5
-
6
- push:
7
- branches:
8
- - main
9
- - 'releases/**'
10
-
11
- workflow_dispatch:
12
-
13
- concurrency:
14
- group: ${{ github.workflow }}-${{ github.ref }}
15
- cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16
-
17
- jobs:
18
- build:
19
- name: Build
20
- runs-on: ubuntu-24.04
21
-
22
- strategy:
23
- fail-fast: false
24
-
25
- steps:
26
- - name: Check out code
27
- uses: actions/checkout@v4
28
-
29
- - name: Cache dependencies
30
- uses: actions/cache@v4
31
- id: npm-install-cache
32
- with:
33
- enableCrossOsArchive: true
34
- key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
35
- path: node_modules
36
-
37
- - name: Cache build
38
- uses: actions/cache@v4
39
- with:
40
- enableCrossOsArchive: true
41
- key: npm-build-${{ runner.os }}-${{ github.sha }}
42
- path: |
43
- .public
44
- .server
45
-
46
- - name: Setup Node.js
47
- uses: actions/setup-node@v4
48
- with:
49
- node-version-file: .nvmrc
50
-
51
- - name: Install dependencies
52
- if: steps.npm-install-cache.outputs.cache-hit != 'true'
53
- run: npm ci
54
-
55
- - name: Run build
56
- run: npm run build
57
-
58
- lint:
59
- name: ${{ matrix.task.description }}
60
- runs-on: ubuntu-24.04
61
- needs: [build]
62
-
63
- env:
64
- # Authorise GitHub API requests for EditorConfig checker binary
65
- # https://www.npmjs.com/package/editorconfig-checker
66
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67
-
68
- strategy:
69
- fail-fast: false
70
-
71
- matrix:
72
- task:
73
- - description: Prettier
74
- name: lint-prettier
75
- run: npm run format:check
76
- cache: .cache/prettier
77
-
78
- - description: EditorConfig
79
- name: lint-editorconfig
80
- run: npm run lint:editorconfig
81
-
82
- - description: ESLint
83
- name: lint-js
84
- run: npm run lint:js
85
- cache: .cache/eslint
86
-
87
- - description: Stylelint
88
- run: npm run lint:scss
89
- cache: .cache/stylelint
90
-
91
- - description: TypeScript compiler
92
- name: lint-types
93
- run: npm run lint:types -- --incremental --pretty
94
- cache: '**/*.tsbuildinfo'
95
-
96
- steps:
97
- - name: Checkout
98
- uses: actions/checkout@v4
99
-
100
- - name: Restore dependencies
101
- uses: actions/cache/restore@v4
102
- with:
103
- enableCrossOsArchive: true
104
- fail-on-cache-miss: true
105
- key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
106
- path: node_modules
107
-
108
- - name: Cache task
109
- if: ${{ matrix.task.cache }}
110
- uses: actions/cache@v4
111
- with:
112
- enableCrossOsArchive: true
113
- key: ${{ matrix.task.name }}-${{ runner.os }}
114
- path: ${{ matrix.task.cache }}
115
-
116
- - name: Setup Node.js
117
- uses: actions/setup-node@v4
118
- with:
119
- node-version-file: .nvmrc
120
-
121
- - name: Run lint task
122
- run: ${{ matrix.task.run }}
123
-
124
- tasks:
125
- name: ${{ matrix.task.description }}
126
- runs-on: ubuntu-24.04
127
- needs: [build]
128
-
129
- strategy:
130
- fail-fast: false
131
-
132
- matrix:
133
- task:
134
- - description: Unit tests
135
- name: test-unit
136
- run: npm run test
137
- cache: coverage
138
-
139
- steps:
140
- - name: Checkout
141
- uses: actions/checkout@v4
142
-
143
- - name: Restore dependencies
144
- uses: actions/cache/restore@v4
145
- with:
146
- enableCrossOsArchive: true
147
- fail-on-cache-miss: true
148
- key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
149
- path: node_modules
150
-
151
- - name: Restore build
152
- uses: actions/cache/restore@v4
153
- with:
154
- enableCrossOsArchive: true
155
- fail-on-cache-miss: true
156
- key: npm-build-${{ runner.os }}-${{ github.sha }}
157
- path: |
158
- .public
159
- .server
160
-
161
- - name: Setup Node.js
162
- uses: actions/setup-node@v4
163
- with:
164
- node-version-file: .nvmrc
165
-
166
- - name: Cache task
167
- if: ${{ matrix.task.cache }}
168
- uses: actions/cache@v4
169
- with:
170
- enableCrossOsArchive: true
171
- key: ${{ matrix.task.name }}-${{ runner.os }}-${{ github.sha }}
172
- path: ${{ matrix.task.cache }}
173
-
174
- - name: Run task
175
- run: ${{ matrix.task.run }}
176
-
177
- - name: Save test coverage
178
- if: ${{ always() }}
179
- uses: actions/upload-artifact@v4
180
- with:
181
- name: ${{ matrix.task.description }} coverage
182
- path: coverage
183
- if-no-files-found: ignore
184
-
185
- analysis:
186
- name: Analysis
187
- if: ${{ always() }}
188
- runs-on: ubuntu-24.04
189
- needs: [build, tasks]
190
-
191
- steps:
192
- - name: Check out code
193
- uses: actions/checkout@v4
194
- with:
195
- fetch-depth: 0
196
-
197
- - name: Restore unit test coverage
198
- uses: actions/cache/restore@v4
199
- with:
200
- enableCrossOsArchive: true
201
- fail-on-cache-miss: true
202
- key: test-unit-${{ runner.os }}-${{ github.sha }}
203
- path: coverage
204
-
205
- - name: SonarCloud Scan
206
- uses: SonarSource/sonarqube-scan-action@v4.2.1
207
- env:
208
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
209
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}