@iobroker/repochecker 5.19.0 → 5.19.2
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.
- package/README.md +9 -0
- package/lib/M3000_Testing.js +530 -74
- package/lib/M5600__I18n.js +29 -11
- package/lib/postprocessing.js +4 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,15 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.19.2 (2026-06-28)
|
|
29
|
+
|
|
30
|
+
- (mcm1957) suggest to always use i18n flag at jsonCOnfig.json
|
|
31
|
+
- (mcm1957) check of test-and.release workflow logs has been added
|
|
32
|
+
|
|
33
|
+
### 5.19.1 (2026-06-28)
|
|
34
|
+
|
|
35
|
+
- (mcm1957) checking of untranslated i18n keys has been adapted
|
|
36
|
+
|
|
28
37
|
### 5.19.0 (2026-06-27)
|
|
29
38
|
|
|
30
39
|
- (mcm1957) github install detection has been enhanced
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -17,6 +17,97 @@ const config = require('./config.js');
|
|
|
17
17
|
const WORKFLOW_FILE = '/.github/workflows/test-and-release.yml';
|
|
18
18
|
const WORKFLOW_FILE_SHORT = 'test-and-release.yml';
|
|
19
19
|
|
|
20
|
+
// Reference output lines for npm run test:package (check-and-lint job).
|
|
21
|
+
// Each non-empty line must appear (as a substring) in the normalized job log.
|
|
22
|
+
// Update this list when the @iobroker/testing package changes its test output.
|
|
23
|
+
const EXPECTED_TEST_PACKAGE_LINES = [
|
|
24
|
+
'Validate the package files',
|
|
25
|
+
'Ensure they are readable',
|
|
26
|
+
'package.json',
|
|
27
|
+
'✔ exists',
|
|
28
|
+
'✔ contains valid JSON',
|
|
29
|
+
'✔ is an object',
|
|
30
|
+
'io-package.json',
|
|
31
|
+
'Check contents of package.json',
|
|
32
|
+
'✔ The property "name" exists',
|
|
33
|
+
'✔ The property "version" exists',
|
|
34
|
+
'✔ The property "description" exists',
|
|
35
|
+
'✔ The property "author" exists',
|
|
36
|
+
'✔ The property "license" exists',
|
|
37
|
+
'✔ The property "repository" exists',
|
|
38
|
+
'✔ The property "repository.type" exists',
|
|
39
|
+
'✔ The package name is correct',
|
|
40
|
+
'✔ property main is defined for non onlyWWW adapters',
|
|
41
|
+
'✔ The repository type is "git"',
|
|
42
|
+
'✔ npm is not listed as a dependency',
|
|
43
|
+
'✔ iobroker.js-controller is not listed as a dependency',
|
|
44
|
+
'Check contents of io-package.json',
|
|
45
|
+
'✔ The property "common.name" exists',
|
|
46
|
+
'✔ The property "common.titleLang" exists',
|
|
47
|
+
'✔ The property "common.version" exists',
|
|
48
|
+
'✔ The property "common.news" exists',
|
|
49
|
+
'✔ The property "common.desc" exists',
|
|
50
|
+
'✔ The property "common.icon" exists',
|
|
51
|
+
'✔ The property "common.extIcon" exists',
|
|
52
|
+
'✔ The property "common.type" exists',
|
|
53
|
+
'✔ The property "common.authors" exists',
|
|
54
|
+
'✔ The property "native" exists',
|
|
55
|
+
'✔ The title does not contain "adapter" or "iobroker"',
|
|
56
|
+
'✔ titleLang is an object to support multiple languages',
|
|
57
|
+
'✔ titleLang does not contain "adapter" or "iobroker"',
|
|
58
|
+
'✔ The description is an object to support multiple languages',
|
|
59
|
+
'✔ common.authors is an array that is not empty',
|
|
60
|
+
'✔ common.news is an object that contains maximum 20 entries',
|
|
61
|
+
'✔ if common.licenseInformation exists, it is an object with required properties',
|
|
62
|
+
'✔ common.license should not exist together with common.licenseInformation',
|
|
63
|
+
'✔ common.tier must be 1, 2 or 3',
|
|
64
|
+
'✔ The adapter uses a supported admin UI',
|
|
65
|
+
'Compare contents of package.json and io-package.json',
|
|
66
|
+
'✔ The name matches',
|
|
67
|
+
'✔ The version matches',
|
|
68
|
+
'✔ The license matches',
|
|
69
|
+
'Validate JSON files',
|
|
70
|
+
'Base directory JSON files',
|
|
71
|
+
'✔ package.json contains valid JSON',
|
|
72
|
+
'✔ io-package.json contains valid JSON',
|
|
73
|
+
'Check additional files',
|
|
74
|
+
'✔ README.md exists',
|
|
75
|
+
'✔ LICENSE exists or is present in the README.md',
|
|
76
|
+
'passing',
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
// Reference output lines for npm run test:integration (adapter-tests jobs).
|
|
80
|
+
// Each non-empty line must appear (as a substring) in the normalized job log.
|
|
81
|
+
// Timestamps are stripped; whitespace is normalised before comparison.
|
|
82
|
+
// Update this list when the @iobroker/testing package changes its test output.
|
|
83
|
+
const EXPECTED_TEST_INTEGRATION_LINES = [
|
|
84
|
+
'testing:integration:AdapterSetup => done!',
|
|
85
|
+
'testing:integration:DBConnection starting DB instances...',
|
|
86
|
+
'testing:integration:DBConnection creating objects DB',
|
|
87
|
+
'testing:integration:DBConnection => objects DB type: jsonl',
|
|
88
|
+
'testing:integration:DBConnection => done!',
|
|
89
|
+
'testing:integration:DBConnection creating states DB',
|
|
90
|
+
'testing:integration:DBConnection => states DB type: jsonl',
|
|
91
|
+
'testing:integration:DBConnection DB instances started',
|
|
92
|
+
'testing:integration:ControllerSetup Moving databases to different ports...',
|
|
93
|
+
'testing:integration:ControllerSetup => done!',
|
|
94
|
+
'testing:integration:ControllerSetup Disabling admin instances...',
|
|
95
|
+
'testing:integration:AdapterSetup Removing old adapter instances...',
|
|
96
|
+
'testing:integration:AdapterSetup Adding adapter instance...',
|
|
97
|
+
'testing:integration:DBConnection Stopping DB instances...',
|
|
98
|
+
'testing:integration:DBConnection DB instances stopped',
|
|
99
|
+
'testing:integration:DBConnection Creating DB backup...',
|
|
100
|
+
'testing:integration:DBConnection No DB instance is running, nothing to stop...',
|
|
101
|
+
'Adapter startup',
|
|
102
|
+
'✔ The adapter starts',
|
|
103
|
+
'testing:integration:TestHarness Stopping adapter instance...',
|
|
104
|
+
'testing:integration:TestHarness => giving it 5000ms to terminate',
|
|
105
|
+
'testing:integration:TestHarness Adapter terminated',
|
|
106
|
+
'testing:integration:DBConnection Stopping DB instances...',
|
|
107
|
+
'testing:integration:DBConnection DB instances stopped',
|
|
108
|
+
'passing',
|
|
109
|
+
];
|
|
110
|
+
|
|
20
111
|
function normalizeVersion(version) {
|
|
21
112
|
return typeof version === 'string' ? version.trim().replace(/^v/, '') : '';
|
|
22
113
|
}
|
|
@@ -69,7 +160,7 @@ function findTagTriggeredRun(workflowRuns, version, taggedVersion) {
|
|
|
69
160
|
);
|
|
70
161
|
}
|
|
71
162
|
|
|
72
|
-
function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, codeBase, sourceLabel) {
|
|
163
|
+
async function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, codeBase, sourceLabel) {
|
|
73
164
|
const tagRun = findTagTriggeredRun(workflowRuns, version, taggedVersion);
|
|
74
165
|
if (!tagRun) {
|
|
75
166
|
context.warnings.push(
|
|
@@ -81,19 +172,103 @@ function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, cod
|
|
|
81
172
|
|
|
82
173
|
if (tagRun.conclusion === 'cancelled') {
|
|
83
174
|
context.warnings.push(
|
|
84
|
-
`[W${codeBase}]
|
|
175
|
+
`[W${codeBase}] "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} was cancelled ${formatRunLink(tagRun)}.`,
|
|
85
176
|
);
|
|
86
177
|
} else if (tagRun.conclusion === 'failure') {
|
|
87
178
|
context.errors.push(
|
|
88
|
-
`[W${codeBase}]
|
|
179
|
+
`[W${codeBase}] "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} failed ${formatRunLink(tagRun)}.`,
|
|
89
180
|
);
|
|
90
181
|
} else {
|
|
91
182
|
context.checks.push(
|
|
92
|
-
`
|
|
183
|
+
`"${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
|
|
93
184
|
);
|
|
94
185
|
common.info(
|
|
95
|
-
`
|
|
186
|
+
`"${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
|
|
96
187
|
);
|
|
188
|
+
|
|
189
|
+
// Check log content for check-and-lint and adapter-tests jobs
|
|
190
|
+
try {
|
|
191
|
+
const runJobs = await fetchRunJobs(context, tagRun.id);
|
|
192
|
+
|
|
193
|
+
// W3050 / S3051: check-and-lint job log
|
|
194
|
+
const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
|
|
195
|
+
if (!checkAndLintJob) {
|
|
196
|
+
context.warnings.push(
|
|
197
|
+
`[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(tagRun)}. ` +
|
|
198
|
+
`Cannot verify "npm run test:package" output.`,
|
|
199
|
+
);
|
|
200
|
+
} else {
|
|
201
|
+
const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
|
|
202
|
+
if (!checkAndLintLog) {
|
|
203
|
+
context.warnings.push(
|
|
204
|
+
`[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(tagRun)}.`,
|
|
205
|
+
);
|
|
206
|
+
} else {
|
|
207
|
+
const missingCheckLines = findMissingExpectedLines(EXPECTED_TEST_PACKAGE_LINES, checkAndLintLog);
|
|
208
|
+
if (missingCheckLines.length > 0) {
|
|
209
|
+
context.warnings.push(
|
|
210
|
+
`[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(tagRun)} ` +
|
|
211
|
+
`does not log the expected defaults for "npm run test:package". ` +
|
|
212
|
+
`Please check the [log](${checkAndLintJob.html_url})`,
|
|
213
|
+
);
|
|
214
|
+
if (common.isDebug()) {
|
|
215
|
+
common.debug(
|
|
216
|
+
`[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
} else {
|
|
220
|
+
context.checks.push(
|
|
221
|
+
`Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(tagRun)}.`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// W3052 / S3053: adapter-tests job logs
|
|
228
|
+
if (!context.cfg.onlyWWW) {
|
|
229
|
+
const adapterTestJobs = runJobs.filter(
|
|
230
|
+
job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
|
|
231
|
+
);
|
|
232
|
+
if (adapterTestJobs.length === 0) {
|
|
233
|
+
context.warnings.push(
|
|
234
|
+
`[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(tagRun)}. ` +
|
|
235
|
+
`Cannot verify "npm run test:integration" output.`,
|
|
236
|
+
);
|
|
237
|
+
} else {
|
|
238
|
+
for (const adapterJob of adapterTestJobs) {
|
|
239
|
+
const adapterLog = await fetchJobLog(context, adapterJob.id);
|
|
240
|
+
if (!adapterLog) {
|
|
241
|
+
context.warnings.push(
|
|
242
|
+
`[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(tagRun)}.`,
|
|
243
|
+
);
|
|
244
|
+
} else {
|
|
245
|
+
const missingAdapterLines = findMissingExpectedLines(
|
|
246
|
+
EXPECTED_TEST_INTEGRATION_LINES,
|
|
247
|
+
adapterLog,
|
|
248
|
+
);
|
|
249
|
+
if (missingAdapterLines.length > 0) {
|
|
250
|
+
context.warnings.push(
|
|
251
|
+
`[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(tagRun)} ` +
|
|
252
|
+
`does not log the expected defaults for "npm run test:integration". ` +
|
|
253
|
+
`Please check the [log](${adapterJob.html_url}).`,
|
|
254
|
+
);
|
|
255
|
+
if (common.isDebug()) {
|
|
256
|
+
common.debug(
|
|
257
|
+
`[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
context.checks.push(
|
|
262
|
+
`Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(tagRun)}.`,
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
} catch (e) {
|
|
270
|
+
common.debug(`Could not check job logs for run ${tagRun.id}: ${e.message}`);
|
|
271
|
+
}
|
|
97
272
|
}
|
|
98
273
|
}
|
|
99
274
|
|
|
@@ -163,6 +338,20 @@ function jobHasStepWithActionInputValue(job, actionPrefix, inputName, expectedVa
|
|
|
163
338
|
});
|
|
164
339
|
}
|
|
165
340
|
|
|
341
|
+
function isExplicitlyTrue(value) {
|
|
342
|
+
if (value === true) {
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
if (typeof value !== 'string') {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
return ['true', 'yes', 'on', 'y'].includes(value.trim().toLowerCase());
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function stepUsesActionPrefix(step, actionPrefix) {
|
|
352
|
+
return typeof step?.uses === 'string' && step.uses.toLowerCase().startsWith(actionPrefix.toLowerCase());
|
|
353
|
+
}
|
|
354
|
+
|
|
166
355
|
/**
|
|
167
356
|
* Parses the major version from an action ref string.
|
|
168
357
|
* Supports values like "v1", "1", "v2.3.4". Returns null for non-numeric refs like branch names.
|
|
@@ -448,6 +637,117 @@ function getAllowedRequiredOsSystems(osClause, requiredSystems, packageOsAliasMa
|
|
|
448
637
|
return allowed;
|
|
449
638
|
}
|
|
450
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Normalises a single line from a GitHub Actions job log:
|
|
642
|
+
* - strips the leading ISO timestamp (e.g. "2024-01-01T00:00:00.0000000Z ")
|
|
643
|
+
* - strips ANSI escape codes
|
|
644
|
+
* - trims and collapses internal whitespace to a single space
|
|
645
|
+
*
|
|
646
|
+
* @param {string} line - raw log line
|
|
647
|
+
* @returns {string} normalised line
|
|
648
|
+
*/
|
|
649
|
+
function normalizeLogLine(line) {
|
|
650
|
+
return line
|
|
651
|
+
.replace(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z\s/, '')
|
|
652
|
+
.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '') // eslint-disable-line no-control-regex
|
|
653
|
+
.trim()
|
|
654
|
+
.replace(/\s+/g, ' ');
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Splits a raw job log text into normalised, non-empty lines, filtering out
|
|
659
|
+
* GitHub Actions control sequences (lines starting with "##[").
|
|
660
|
+
*
|
|
661
|
+
* @param {string} logText - raw log text
|
|
662
|
+
* @returns {string[]} normalised lines
|
|
663
|
+
*/
|
|
664
|
+
function extractNormalizedLogLines(logText) {
|
|
665
|
+
if (!logText || typeof logText !== 'string') {
|
|
666
|
+
return [];
|
|
667
|
+
}
|
|
668
|
+
return logText
|
|
669
|
+
.split('\n')
|
|
670
|
+
.map(normalizeLogLine)
|
|
671
|
+
.filter(line => line.length > 0 && !line.startsWith('##['));
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Returns the subset of expectedLines that cannot be found in logText.
|
|
676
|
+
* Duplicate expected lines are checked only once.
|
|
677
|
+
* Comparison uses substring matching after whitespace normalisation.
|
|
678
|
+
*
|
|
679
|
+
* @param {string[]} expectedLines - reference lines to look for
|
|
680
|
+
* @param {string} logText - raw job log text
|
|
681
|
+
* @returns {string[]} missing lines (normalised)
|
|
682
|
+
*/
|
|
683
|
+
function findMissingExpectedLines(expectedLines, logText) {
|
|
684
|
+
const normalizedLog = extractNormalizedLogLines(logText);
|
|
685
|
+
const missing = [];
|
|
686
|
+
const checked = new Set();
|
|
687
|
+
|
|
688
|
+
for (const expected of expectedLines) {
|
|
689
|
+
const normalizedExpected = expected.trim().replace(/\s+/g, ' ');
|
|
690
|
+
if (!normalizedExpected || checked.has(normalizedExpected)) {
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
checked.add(normalizedExpected);
|
|
694
|
+
|
|
695
|
+
const found = normalizedLog.some(logLine => logLine.includes(normalizedExpected));
|
|
696
|
+
if (!found) {
|
|
697
|
+
missing.push(normalizedExpected);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return missing;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Fetches the list of jobs for a workflow run (handles pagination).
|
|
705
|
+
*
|
|
706
|
+
* @param {object} context - checker context
|
|
707
|
+
* @param {number} runId - workflow run ID
|
|
708
|
+
* @returns {Promise<object[]>} array of job objects
|
|
709
|
+
*/
|
|
710
|
+
async function fetchRunJobs(context, runId) {
|
|
711
|
+
const jobs = [];
|
|
712
|
+
let page = 1;
|
|
713
|
+
try {
|
|
714
|
+
while (true) {
|
|
715
|
+
const url = `${context.githubUrlApi}/actions/runs/${runId}/jobs?per_page=100&page=${page}`;
|
|
716
|
+
common.debug(`Retrieving jobs for run ${runId} (page ${page})`);
|
|
717
|
+
const response = await axios.get(url);
|
|
718
|
+
const jobsPage = response.data?.jobs ?? [];
|
|
719
|
+
jobs.push(...jobsPage);
|
|
720
|
+
if (jobsPage.length < 100) {
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
page++;
|
|
724
|
+
}
|
|
725
|
+
} catch (e) {
|
|
726
|
+
common.debug(`Could not fetch jobs for run ${runId}: ${e.message}`);
|
|
727
|
+
}
|
|
728
|
+
return jobs;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Downloads the plain-text log for a single GitHub Actions job.
|
|
733
|
+
* The API redirects to a download URL; axios follows the redirect automatically.
|
|
734
|
+
*
|
|
735
|
+
* @param {object} context - checker context
|
|
736
|
+
* @param {number} jobId - job ID
|
|
737
|
+
* @returns {Promise<string|null>} log text or null on failure
|
|
738
|
+
*/
|
|
739
|
+
async function fetchJobLog(context, jobId) {
|
|
740
|
+
const url = `${context.githubUrlApi}/actions/jobs/${jobId}/logs`;
|
|
741
|
+
try {
|
|
742
|
+
common.debug(`Fetching log for job ${jobId}`);
|
|
743
|
+
const response = await axios.get(url, { maxRedirects: 10, responseType: 'text' });
|
|
744
|
+
return typeof response.data === 'string' ? response.data : null;
|
|
745
|
+
} catch (e) {
|
|
746
|
+
common.debug(`Could not fetch log for job ${jobId}: ${e.message}`);
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
451
751
|
async function checkTests(context) {
|
|
452
752
|
console.log('\n[E3000 - E3999] checking tests');
|
|
453
753
|
|
|
@@ -529,7 +829,7 @@ async function checkTests(context) {
|
|
|
529
829
|
// --- W3005: check for pull_request in 'on' ---
|
|
530
830
|
if (!onAttr || !Object.prototype.hasOwnProperty.call(onAttr, 'pull_request')) {
|
|
531
831
|
context.warnings.push(
|
|
532
|
-
`[W3005]
|
|
832
|
+
`[W3005] "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.`,
|
|
533
833
|
);
|
|
534
834
|
} else {
|
|
535
835
|
context.checks.push('Workflow trigger includes "pull_request".');
|
|
@@ -538,7 +838,7 @@ async function checkTests(context) {
|
|
|
538
838
|
// --- E3006 / E3007 / E3008: check for push in 'on' ---
|
|
539
839
|
if (!onAttr || !Object.prototype.hasOwnProperty.call(onAttr, 'push')) {
|
|
540
840
|
context.errors.push(
|
|
541
|
-
`[E3006]
|
|
841
|
+
`[E3006] "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.`,
|
|
542
842
|
);
|
|
543
843
|
} else {
|
|
544
844
|
context.checks.push('Workflow trigger includes "push".');
|
|
@@ -549,7 +849,7 @@ async function checkTests(context) {
|
|
|
549
849
|
const branches = pushConfig.branches;
|
|
550
850
|
if (!branches || !Array.isArray(branches) || branches.length === 0) {
|
|
551
851
|
context.errors.push(
|
|
552
|
-
`[E3007]
|
|
852
|
+
`[E3007] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration. ` +
|
|
553
853
|
`Must include "*" or the default branch ("${context.branch}").`,
|
|
554
854
|
);
|
|
555
855
|
} else {
|
|
@@ -558,7 +858,7 @@ async function checkTests(context) {
|
|
|
558
858
|
const hasDefaultBranch = branches.includes(defaultBranch);
|
|
559
859
|
if (!hasWildcard && !hasDefaultBranch) {
|
|
560
860
|
context.errors.push(
|
|
561
|
-
`[E3037]
|
|
861
|
+
`[E3037] "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch "${defaultBranch}". ` +
|
|
562
862
|
`Found: ${JSON.stringify(branches)}`,
|
|
563
863
|
);
|
|
564
864
|
} else {
|
|
@@ -571,7 +871,7 @@ async function checkTests(context) {
|
|
|
571
871
|
const requiredTagPatterns = ['v[0-9]+.[0-9]+.[0-9]+', 'v[0-9]+.[0-9]+.[0-9]+-**'];
|
|
572
872
|
if (!tags || !Array.isArray(tags)) {
|
|
573
873
|
context.errors.push(
|
|
574
|
-
`[E3008]
|
|
874
|
+
`[E3008] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration. ` +
|
|
575
875
|
`Required tag patterns: ${requiredTagPatterns.join(', ')}`,
|
|
576
876
|
);
|
|
577
877
|
} else {
|
|
@@ -579,7 +879,7 @@ async function checkTests(context) {
|
|
|
579
879
|
const missingPatterns = requiredTagPatterns.filter(pat => !cleanedTags.includes(pat));
|
|
580
880
|
if (missingPatterns.length > 0) {
|
|
581
881
|
context.errors.push(
|
|
582
|
-
`[E3040]
|
|
882
|
+
`[E3040] "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s): ${missingPatterns.join(', ')}`,
|
|
583
883
|
);
|
|
584
884
|
} else {
|
|
585
885
|
context.checks.push('Workflow "push" trigger tags are correctly configured.');
|
|
@@ -591,7 +891,7 @@ async function checkTests(context) {
|
|
|
591
891
|
const concurrency = workflow.concurrency;
|
|
592
892
|
if (!concurrency || concurrency.group !== '${{ github.ref }}' || concurrency['cancel-in-progress'] !== true) {
|
|
593
893
|
context.warnings.push(
|
|
594
|
-
`[W3009]
|
|
894
|
+
`[W3009] "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration. See ` +
|
|
595
895
|
`"https://github.com/ioBroker/ioBroker.example/blob/e7db900495bb3c2b89dc35d863dda4ccf33f5def/JavaScript/.github/workflows/test-and-release.yml#L17" for details.`,
|
|
596
896
|
);
|
|
597
897
|
} else {
|
|
@@ -656,6 +956,93 @@ async function checkTests(context) {
|
|
|
656
956
|
`Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" finished with conclusion "${lastRun.conclusion}" ${formatRunLink(lastRun)}.`,
|
|
657
957
|
);
|
|
658
958
|
}
|
|
959
|
+
|
|
960
|
+
// Check log content for check-and-lint and adapter-tests jobs
|
|
961
|
+
try {
|
|
962
|
+
const runJobs = await fetchRunJobs(context, lastRun.id);
|
|
963
|
+
|
|
964
|
+
// W3050 / S3051: check-and-lint job log
|
|
965
|
+
const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
|
|
966
|
+
if (!checkAndLintJob) {
|
|
967
|
+
context.warnings.push(
|
|
968
|
+
`[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(lastRun)}. ` +
|
|
969
|
+
`Cannot verify "npm run test:package" output.`,
|
|
970
|
+
);
|
|
971
|
+
} else {
|
|
972
|
+
const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
|
|
973
|
+
if (!checkAndLintLog) {
|
|
974
|
+
context.warnings.push(
|
|
975
|
+
`[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(lastRun)}.`,
|
|
976
|
+
);
|
|
977
|
+
} else {
|
|
978
|
+
const missingCheckLines = findMissingExpectedLines(
|
|
979
|
+
EXPECTED_TEST_PACKAGE_LINES,
|
|
980
|
+
checkAndLintLog,
|
|
981
|
+
);
|
|
982
|
+
if (missingCheckLines.length > 0) {
|
|
983
|
+
context.warnings.push(
|
|
984
|
+
`[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(lastRun)} ` +
|
|
985
|
+
`does not log the expected defaults for "npm run test:package". ` +
|
|
986
|
+
`Please check the [log](${checkAndLintJob.html_url}),`,
|
|
987
|
+
);
|
|
988
|
+
if (common.isDebug()) {
|
|
989
|
+
common.debug(
|
|
990
|
+
`[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
} else {
|
|
994
|
+
context.checks.push(
|
|
995
|
+
`Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(lastRun)}.`,
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// W3052 / S3053: adapter-tests job logs
|
|
1002
|
+
if (!context.cfg.onlyWWW) {
|
|
1003
|
+
const adapterTestJobs = runJobs.filter(
|
|
1004
|
+
job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
|
|
1005
|
+
);
|
|
1006
|
+
if (adapterTestJobs.length === 0) {
|
|
1007
|
+
context.warnings.push(
|
|
1008
|
+
`[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(lastRun)}. ` +
|
|
1009
|
+
`Cannot verify "npm run test:integration" output.`,
|
|
1010
|
+
);
|
|
1011
|
+
} else {
|
|
1012
|
+
for (const adapterJob of adapterTestJobs) {
|
|
1013
|
+
const adapterLog = await fetchJobLog(context, adapterJob.id);
|
|
1014
|
+
if (!adapterLog) {
|
|
1015
|
+
context.warnings.push(
|
|
1016
|
+
`[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(lastRun)}.`,
|
|
1017
|
+
);
|
|
1018
|
+
} else {
|
|
1019
|
+
const missingAdapterLines = findMissingExpectedLines(
|
|
1020
|
+
EXPECTED_TEST_INTEGRATION_LINES,
|
|
1021
|
+
adapterLog,
|
|
1022
|
+
);
|
|
1023
|
+
if (missingAdapterLines.length > 0) {
|
|
1024
|
+
context.warnings.push(
|
|
1025
|
+
`[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(lastRun)} ` +
|
|
1026
|
+
`does not log the expected defaults for "npm run test:integration". ` +
|
|
1027
|
+
`Please check the [log](${adapterJob.html_url}).`,
|
|
1028
|
+
);
|
|
1029
|
+
if (common.isDebug()) {
|
|
1030
|
+
common.debug(
|
|
1031
|
+
`[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
} else {
|
|
1035
|
+
context.checks.push(
|
|
1036
|
+
`Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(lastRun)}.`,
|
|
1037
|
+
);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
} catch (e) {
|
|
1044
|
+
common.debug(`Could not check job logs for run ${lastRun.id}: ${e.message}`);
|
|
1045
|
+
}
|
|
659
1046
|
}
|
|
660
1047
|
|
|
661
1048
|
const tagsResponse = await axios(`${context.githubUrlApi}/tags?per_page=100`);
|
|
@@ -673,7 +1060,7 @@ async function checkTests(context) {
|
|
|
673
1060
|
`[W3032] Release ${currentRelease} from io-package.json/package.json has not yet been tagged. Tagging releases is required.`,
|
|
674
1061
|
);
|
|
675
1062
|
} else {
|
|
676
|
-
checkTagTriggeredRun(
|
|
1063
|
+
await checkTagTriggeredRun(
|
|
677
1064
|
context,
|
|
678
1065
|
workflowRuns,
|
|
679
1066
|
currentRelease,
|
|
@@ -703,7 +1090,7 @@ async function checkTests(context) {
|
|
|
703
1090
|
`[E3034] Release ${npmLatestRelease} tagged as "latest" at npm has not yet been tagged at GitHub. Tagging of releases is required.`,
|
|
704
1091
|
);
|
|
705
1092
|
} else {
|
|
706
|
-
checkTagTriggeredRun(
|
|
1093
|
+
await checkTagTriggeredRun(
|
|
707
1094
|
context,
|
|
708
1095
|
workflowRuns,
|
|
709
1096
|
npmLatestRelease,
|
|
@@ -722,7 +1109,7 @@ async function checkTests(context) {
|
|
|
722
1109
|
`[E3036] Newest npm release ${newestNpmRelease} has not yet been tagged at GitHub. Tagging of releases is required.`,
|
|
723
1110
|
);
|
|
724
1111
|
} else {
|
|
725
|
-
checkTagTriggeredRun(
|
|
1112
|
+
await checkTagTriggeredRun(
|
|
726
1113
|
context,
|
|
727
1114
|
workflowRuns,
|
|
728
1115
|
newestNpmRelease,
|
|
@@ -751,6 +1138,34 @@ async function checkTests(context) {
|
|
|
751
1138
|
common.debug('testing jobs');
|
|
752
1139
|
const jobs = workflow.jobs || {};
|
|
753
1140
|
|
|
1141
|
+
// W3046 / E3047: "continue-on-error: true" should not be used in test-and-release workflow steps
|
|
1142
|
+
const protectedActionPrefixes = [
|
|
1143
|
+
'ioBroker/testing-action-check@',
|
|
1144
|
+
'ioBroker/testing-action-adapter@',
|
|
1145
|
+
'ioBroker/testing-action-deploy@',
|
|
1146
|
+
];
|
|
1147
|
+
for (const [jobName, job] of Object.entries(jobs)) {
|
|
1148
|
+
if (!Array.isArray(job.steps)) {
|
|
1149
|
+
continue;
|
|
1150
|
+
}
|
|
1151
|
+
for (let i = 0; i < job.steps.length; i++) {
|
|
1152
|
+
const step = job.steps[i];
|
|
1153
|
+
if (!isExplicitlyTrue(step?.['continue-on-error'])) {
|
|
1154
|
+
continue;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
const stepLabel = typeof step?.name === 'string' && step.name.trim() ? step.name.trim() : `#${i + 1}`;
|
|
1158
|
+
const message =
|
|
1159
|
+
`"${WORKFLOW_FILE_SHORT}": job "${jobName}" step "${stepLabel}" uses "continue-on-error: true". ` +
|
|
1160
|
+
'Workflow test-and-release should abort if any error occurs; remove "continue-on-error".';
|
|
1161
|
+
if (protectedActionPrefixes.some(prefix => stepUsesActionPrefix(step, prefix))) {
|
|
1162
|
+
context.errors.push(`[E3047] ${message}`);
|
|
1163
|
+
} else {
|
|
1164
|
+
context.warnings.push(`[W3046] ${message}`);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
754
1169
|
// Compute effective minimum and recommended node.js versions per non-matrix job.
|
|
755
1170
|
// If the engines:node clause in package.json is higher than the config defaults, use that value.
|
|
756
1171
|
const testingCfg = config.testingNodeJs;
|
|
@@ -784,11 +1199,11 @@ async function checkTests(context) {
|
|
|
784
1199
|
common.debug(' job check-and-lint not found');
|
|
785
1200
|
if (!context.cfg.onlyWWW) {
|
|
786
1201
|
context.errors.push(
|
|
787
|
-
`[E3010]
|
|
1202
|
+
`[E3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.`,
|
|
788
1203
|
);
|
|
789
1204
|
} else {
|
|
790
1205
|
context.warnings.push(
|
|
791
|
-
`[S3010]
|
|
1206
|
+
`[S3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.`,
|
|
792
1207
|
);
|
|
793
1208
|
}
|
|
794
1209
|
} else {
|
|
@@ -800,7 +1215,7 @@ async function checkTests(context) {
|
|
|
800
1215
|
const requiredCheckActionVersion = testingCfg['ioBroker/testing-action-check'];
|
|
801
1216
|
if (!jobHasStepWithAction(jobs['check-and-lint'], checkActionPrefix)) {
|
|
802
1217
|
context.warnings.push(
|
|
803
|
-
`[W3013]
|
|
1218
|
+
`[W3013] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
|
|
804
1219
|
);
|
|
805
1220
|
} else {
|
|
806
1221
|
context.checks.push(
|
|
@@ -814,7 +1229,7 @@ async function checkTests(context) {
|
|
|
814
1229
|
});
|
|
815
1230
|
for (const lowerRef of lowerRefs) {
|
|
816
1231
|
context.warnings.push(
|
|
817
|
-
`[W3028]
|
|
1232
|
+
`[W3028] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" ` +
|
|
818
1233
|
`which is below the required version "${requiredCheckActionVersion}".`,
|
|
819
1234
|
);
|
|
820
1235
|
}
|
|
@@ -823,20 +1238,38 @@ async function checkTests(context) {
|
|
|
823
1238
|
for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
|
|
824
1239
|
const majorVersion = `v${parseActionMajorVersion(ref)}`;
|
|
825
1240
|
context.warnings.push(
|
|
826
|
-
`[S3042]
|
|
1241
|
+
`[S3042] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" ` +
|
|
827
1242
|
`with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
|
|
828
1243
|
);
|
|
829
1244
|
}
|
|
830
1245
|
|
|
831
1246
|
if (!jobHasStepWithActionInputValue(jobs['check-and-lint'], checkActionPrefix, 'lint', true)) {
|
|
832
1247
|
context.warnings.push(
|
|
833
|
-
`[S3045]
|
|
1248
|
+
`[S3045] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true" for "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
|
|
834
1249
|
);
|
|
835
1250
|
} else {
|
|
836
1251
|
context.checks.push(
|
|
837
1252
|
`Job "check-and-lint" enables "lint: true" for "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
|
|
838
1253
|
);
|
|
839
1254
|
}
|
|
1255
|
+
|
|
1256
|
+
// W3048: check-and-lint should not override default commands in testing-action-check
|
|
1257
|
+
const forbiddenCheckParams = ['type-checking-command', 'lint-command', 'test-command'];
|
|
1258
|
+
for (const param of forbiddenCheckParams) {
|
|
1259
|
+
const stepWithParam = jobs['check-and-lint'].steps.find(
|
|
1260
|
+
step =>
|
|
1261
|
+
typeof step.uses === 'string' &&
|
|
1262
|
+
step.uses.startsWith(checkActionPrefix) &&
|
|
1263
|
+
step.with &&
|
|
1264
|
+
Object.prototype.hasOwnProperty.call(step.with, param),
|
|
1265
|
+
);
|
|
1266
|
+
if (stepWithParam) {
|
|
1267
|
+
context.warnings.push(
|
|
1268
|
+
`[W3048] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" step using "ioBroker/testing-action-check" ` +
|
|
1269
|
+
`specifies "${param}". This command should not be changed; the default value should be used.`,
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
840
1273
|
}
|
|
841
1274
|
|
|
842
1275
|
// E3020 / S3021: check node.js version for check-and-lint job
|
|
@@ -844,13 +1277,13 @@ async function checkTests(context) {
|
|
|
844
1277
|
if (checkLintNodeVersion !== null) {
|
|
845
1278
|
if (checkLintNodeVersion < effectiveMinCheckAndLint) {
|
|
846
1279
|
context.errors.push(
|
|
847
|
-
`[E3020]
|
|
1280
|
+
`[E3020] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} ` +
|
|
848
1281
|
`which is below the minimum required version ${effectiveMinCheckAndLint}. ` +
|
|
849
1282
|
`Please update to node.js ${effectiveRecCheckAndLint}.`,
|
|
850
1283
|
);
|
|
851
1284
|
} else if (checkLintNodeVersion < effectiveRecCheckAndLint) {
|
|
852
1285
|
context.warnings.push(
|
|
853
|
-
`[S3021]
|
|
1286
|
+
`[S3021] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. ` +
|
|
854
1287
|
`Consider updating to the recommended version ${effectiveRecCheckAndLint}.`,
|
|
855
1288
|
);
|
|
856
1289
|
} else {
|
|
@@ -868,7 +1301,7 @@ async function checkTests(context) {
|
|
|
868
1301
|
} else if (!jobs['adapter-tests']) {
|
|
869
1302
|
common.debug(' job adapter-tests not found');
|
|
870
1303
|
context.errors.push(
|
|
871
|
-
`[E3011]
|
|
1304
|
+
`[E3011] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.`,
|
|
872
1305
|
);
|
|
873
1306
|
} else {
|
|
874
1307
|
common.debug(' job adapter-tests found');
|
|
@@ -877,7 +1310,7 @@ async function checkTests(context) {
|
|
|
877
1310
|
// S3014: adapter-tests should need check-and-lint
|
|
878
1311
|
if (!jobNeedsAll(jobs['adapter-tests'], ['check-and-lint'])) {
|
|
879
1312
|
context.warnings.push(
|
|
880
|
-
`[S3014]
|
|
1313
|
+
`[S3014] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.`,
|
|
881
1314
|
);
|
|
882
1315
|
} else {
|
|
883
1316
|
context.checks.push('Job "adapter-tests" correctly requires "check-and-lint".');
|
|
@@ -888,7 +1321,7 @@ async function checkTests(context) {
|
|
|
888
1321
|
const requiredAdapterActionVersion = testingCfg['ioBroker/testing-action-adapter'];
|
|
889
1322
|
if (!jobHasStepWithAction(jobs['adapter-tests'], adapterActionPrefix)) {
|
|
890
1323
|
context.warnings.push(
|
|
891
|
-
`[W3015]
|
|
1324
|
+
`[W3015] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".`,
|
|
892
1325
|
);
|
|
893
1326
|
} else {
|
|
894
1327
|
context.checks.push(
|
|
@@ -902,7 +1335,7 @@ async function checkTests(context) {
|
|
|
902
1335
|
});
|
|
903
1336
|
for (const lowerRef of lowerRefs) {
|
|
904
1337
|
context.warnings.push(
|
|
905
|
-
`[W3029]
|
|
1338
|
+
`[W3029] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" ` +
|
|
906
1339
|
`which is below the required version "${requiredAdapterActionVersion}".`,
|
|
907
1340
|
);
|
|
908
1341
|
}
|
|
@@ -911,10 +1344,25 @@ async function checkTests(context) {
|
|
|
911
1344
|
for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
|
|
912
1345
|
const majorVersion = `v${parseActionMajorVersion(ref)}`;
|
|
913
1346
|
context.warnings.push(
|
|
914
|
-
`[S3043]
|
|
1347
|
+
`[S3043] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" ` +
|
|
915
1348
|
`with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
|
|
916
1349
|
);
|
|
917
1350
|
}
|
|
1351
|
+
|
|
1352
|
+
// W3049: adapter-tests should not override integration-test-command in testing-action-adapter
|
|
1353
|
+
const adapterStepWithParam = jobs['adapter-tests'].steps.find(
|
|
1354
|
+
step =>
|
|
1355
|
+
typeof step.uses === 'string' &&
|
|
1356
|
+
step.uses.startsWith(adapterActionPrefix) &&
|
|
1357
|
+
step.with &&
|
|
1358
|
+
Object.prototype.hasOwnProperty.call(step.with, 'integration-test-command'),
|
|
1359
|
+
);
|
|
1360
|
+
if (adapterStepWithParam) {
|
|
1361
|
+
context.warnings.push(
|
|
1362
|
+
`[W3049] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" step using "ioBroker/testing-action-adapter" ` +
|
|
1363
|
+
`specifies "integration-test-command". This command should not be changed; the default value should be used.`,
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
918
1366
|
}
|
|
919
1367
|
|
|
920
1368
|
// W3024 / E3025 / W3026: check node.js version matrix for adapter-tests
|
|
@@ -935,7 +1383,7 @@ async function checkTests(context) {
|
|
|
935
1383
|
const invalidVersions = matrixNodeVersions.filter(v => !validVersionNums.includes(v));
|
|
936
1384
|
for (const v of invalidVersions) {
|
|
937
1385
|
context.warnings.push(
|
|
938
|
-
`[W3024]
|
|
1386
|
+
`[W3024] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} ` +
|
|
939
1387
|
`which is not in the list of recommended testing versions (${testingCfg.validMatrixNodeVersions.join(', ')}).`,
|
|
940
1388
|
);
|
|
941
1389
|
}
|
|
@@ -944,7 +1392,7 @@ async function checkTests(context) {
|
|
|
944
1392
|
const missingRequired = requiredVersionNums.filter(v => !matrixNodeVersions.includes(v));
|
|
945
1393
|
for (const v of missingRequired) {
|
|
946
1394
|
context.errors.push(
|
|
947
|
-
`[E3025]
|
|
1395
|
+
`[E3025] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}. ` +
|
|
948
1396
|
`Tests with node.js ${v} are required.`,
|
|
949
1397
|
);
|
|
950
1398
|
}
|
|
@@ -955,7 +1403,7 @@ async function checkTests(context) {
|
|
|
955
1403
|
);
|
|
956
1404
|
for (const v of missingRecommended) {
|
|
957
1405
|
context.warnings.push(
|
|
958
|
-
`[W3026]
|
|
1406
|
+
`[W3026] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}. ` +
|
|
959
1407
|
`Consider adding tests with node.js ${v}.`,
|
|
960
1408
|
);
|
|
961
1409
|
}
|
|
@@ -1001,7 +1449,7 @@ async function checkTests(context) {
|
|
|
1001
1449
|
const uncoveredMissingSystems = missingSystems.filter(system => allowedSystems.has(system));
|
|
1002
1450
|
if (uncoveredMissingSystems.length > 0) {
|
|
1003
1451
|
context.warnings.push(
|
|
1004
|
-
`[W3027]
|
|
1452
|
+
`[W3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems.join(', ')} is missing in job "adapter-tests". ` +
|
|
1005
1453
|
`Add corresponding tests to "${WORKFLOW_FILE_SHORT}" or adapt package.json "os" accordingly.`,
|
|
1006
1454
|
);
|
|
1007
1455
|
} else {
|
|
@@ -1016,7 +1464,7 @@ async function checkTests(context) {
|
|
|
1016
1464
|
if (!jobs['deploy']) {
|
|
1017
1465
|
common.debug(' job deploy found');
|
|
1018
1466
|
context.warnings.push(
|
|
1019
|
-
`[S3012]
|
|
1467
|
+
`[S3012] "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.`,
|
|
1020
1468
|
);
|
|
1021
1469
|
} else {
|
|
1022
1470
|
common.debug(' job deploy found');
|
|
@@ -1027,7 +1475,7 @@ async function checkTests(context) {
|
|
|
1027
1475
|
const requiredDependencies = ['check-and-lint', 'adapter-tests'].filter(j => jobs[j]);
|
|
1028
1476
|
if (!requiredDependencies.every(req => jobDependsOn(jobs, 'deploy', req))) {
|
|
1029
1477
|
context.errors.push(
|
|
1030
|
-
`[E3016]
|
|
1478
|
+
`[E3016] "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".`,
|
|
1031
1479
|
);
|
|
1032
1480
|
} else {
|
|
1033
1481
|
context.checks.push('Job "deploy" correctly requires "check-and-lint" and "adapter-tests".');
|
|
@@ -1038,7 +1486,7 @@ async function checkTests(context) {
|
|
|
1038
1486
|
const requiredDeployActionVersion = testingCfg['ioBroker/testing-action-deploy'];
|
|
1039
1487
|
if (!jobHasStepWithAction(jobs['deploy'], deployActionPrefix)) {
|
|
1040
1488
|
context.warnings.push(
|
|
1041
|
-
`[W3017]
|
|
1489
|
+
`[W3017] "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".`,
|
|
1042
1490
|
);
|
|
1043
1491
|
} else {
|
|
1044
1492
|
context.checks.push(
|
|
@@ -1052,7 +1500,7 @@ async function checkTests(context) {
|
|
|
1052
1500
|
});
|
|
1053
1501
|
for (const lowerRef of lowerRefs) {
|
|
1054
1502
|
context.warnings.push(
|
|
1055
|
-
`[W3030]
|
|
1503
|
+
`[W3030] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" ` +
|
|
1056
1504
|
`which is below the required version "${requiredDeployActionVersion}".`,
|
|
1057
1505
|
);
|
|
1058
1506
|
}
|
|
@@ -1061,7 +1509,7 @@ async function checkTests(context) {
|
|
|
1061
1509
|
for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
|
|
1062
1510
|
const majorVersion = `v${parseActionMajorVersion(ref)}`;
|
|
1063
1511
|
context.warnings.push(
|
|
1064
|
-
`[S3044]
|
|
1512
|
+
`[S3044] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" ` +
|
|
1065
1513
|
`with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
|
|
1066
1514
|
);
|
|
1067
1515
|
}
|
|
@@ -1072,7 +1520,7 @@ async function checkTests(context) {
|
|
|
1072
1520
|
const hasIdTokenWrite = permissions && permissions['id-token'] === 'write';
|
|
1073
1521
|
if (!hasContentsWrite || !hasIdTokenWrite) {
|
|
1074
1522
|
context.warnings.push(
|
|
1075
|
-
`[S3018]
|
|
1523
|
+
`[S3018] "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level. ` +
|
|
1076
1524
|
`Trusted publishing will not work without them.`,
|
|
1077
1525
|
);
|
|
1078
1526
|
} else {
|
|
@@ -1091,7 +1539,7 @@ async function checkTests(context) {
|
|
|
1091
1539
|
Object.prototype.hasOwnProperty.call(deployStep.with, 'npm-token')
|
|
1092
1540
|
) {
|
|
1093
1541
|
context.warnings.push(
|
|
1094
|
-
`[W3019]
|
|
1542
|
+
`[W3019] "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" ` +
|
|
1095
1543
|
`has "npm-token" parameter specified. ` +
|
|
1096
1544
|
`Trusted publishing will not work while "npm-token" is set.`,
|
|
1097
1545
|
);
|
|
@@ -1105,13 +1553,13 @@ async function checkTests(context) {
|
|
|
1105
1553
|
if (deployNodeVersion !== null) {
|
|
1106
1554
|
if (deployNodeVersion < effectiveMinDeploy) {
|
|
1107
1555
|
context.errors.push(
|
|
1108
|
-
`[E3022]
|
|
1556
|
+
`[E3022] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} ` +
|
|
1109
1557
|
`which is below the minimum required version ${effectiveMinDeploy}. ` +
|
|
1110
1558
|
`Please update to node.js ${effectiveRecDeploy}.`,
|
|
1111
1559
|
);
|
|
1112
1560
|
} else if (deployNodeVersion < effectiveRecDeploy) {
|
|
1113
1561
|
context.warnings.push(
|
|
1114
|
-
`[S3023]
|
|
1562
|
+
`[S3023] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. ` +
|
|
1115
1563
|
`Consider updating to the recommended version ${effectiveRecDeploy}.`,
|
|
1116
1564
|
);
|
|
1117
1565
|
} else {
|
|
@@ -1136,33 +1584,33 @@ exports.checkTests = checkTests;
|
|
|
1136
1584
|
// [E3002] Workflow file "${WORKFLOW_FILE}" not found. Please create it for standard CI/CD testing.
|
|
1137
1585
|
// [E3003] Workflow file "${WORKFLOW_FILE}" could not be read, is empty, not valid YAML, or does not contain valid workflow content.
|
|
1138
1586
|
// [W3004] Workflow "name" in "${WORKFLOW_FILE_SHORT}" must be "Test and Release".
|
|
1139
|
-
// [W3005]
|
|
1140
|
-
// [E3006]
|
|
1141
|
-
// [E3007]
|
|
1142
|
-
// [E3008]
|
|
1143
|
-
// [W3009]
|
|
1144
|
-
// [S3010]
|
|
1145
|
-
// [E3010]
|
|
1146
|
-
// [E3011]
|
|
1147
|
-
// [S3012]
|
|
1148
|
-
// [W3013]
|
|
1149
|
-
// [S3014]
|
|
1150
|
-
// [W3015]
|
|
1151
|
-
// [E3016]
|
|
1152
|
-
// [W3017]
|
|
1153
|
-
// [S3018]
|
|
1154
|
-
// [W3019]
|
|
1155
|
-
// [E3020]
|
|
1156
|
-
// [S3021]
|
|
1157
|
-
// [E3022]
|
|
1158
|
-
// [S3023]
|
|
1159
|
-
// [W3024]
|
|
1160
|
-
// [E3025]
|
|
1161
|
-
// [W3026]
|
|
1162
|
-
// [W3027]
|
|
1163
|
-
// [W3028]
|
|
1164
|
-
// [W3029]
|
|
1165
|
-
// [W3030]
|
|
1587
|
+
// [W3005] "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.
|
|
1588
|
+
// [E3006] "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.
|
|
1589
|
+
// [E3007] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration.
|
|
1590
|
+
// [E3008] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration.
|
|
1591
|
+
// [W3009] "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration.
|
|
1592
|
+
// [S3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.
|
|
1593
|
+
// [E3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.
|
|
1594
|
+
// [E3011] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.
|
|
1595
|
+
// [S3012] "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.
|
|
1596
|
+
// [W3013] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".
|
|
1597
|
+
// [S3014] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.
|
|
1598
|
+
// [W3015] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".
|
|
1599
|
+
// [E3016] "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".
|
|
1600
|
+
// [W3017] "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".
|
|
1601
|
+
// [S3018] "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level.
|
|
1602
|
+
// [W3019] "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" has "npm-token" parameter specified.
|
|
1603
|
+
// [E3020] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} which is below the minimum required version.
|
|
1604
|
+
// [S3021] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. Consider updating.
|
|
1605
|
+
// [E3022] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} which is below the minimum required version.
|
|
1606
|
+
// [S3023] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. Consider updating.
|
|
1607
|
+
// [W3024] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} which is below the minimum required version.
|
|
1608
|
+
// [E3025] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}.
|
|
1609
|
+
// [W3026] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}.
|
|
1610
|
+
// [W3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems} is missing.
|
|
1611
|
+
// [W3028] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" which is below the required version.
|
|
1612
|
+
// [W3029] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" which is below the required version.
|
|
1613
|
+
// [W3030] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" which is below the required version.
|
|
1166
1614
|
// [W3031] No workflow runs found for "${WORKFLOW_FILE_SHORT}".
|
|
1167
1615
|
// [E3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" failed.
|
|
1168
1616
|
// [S3031] package.json "os" excludes required OS systems.
|
|
@@ -1171,12 +1619,20 @@ exports.checkTests = checkTests;
|
|
|
1171
1619
|
// [E3034] Release ${npmLatestRelease} tagged as "latest" at npm has not yet been tagged at GitHub. Tagging of releases is required.
|
|
1172
1620
|
// [W3035] No workflow run for "${WORKFLOW_FILE_SHORT}" triggered by tag "${taggedVersion}" was found for ...
|
|
1173
1621
|
// [E3036] Newest npm release ${newestNpmRelease} has not yet been tagged at GitHub. Tagging of releases is required.
|
|
1174
|
-
// [E3037]
|
|
1622
|
+
// [E3037] "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch.
|
|
1175
1623
|
// [W3038] Could not retrieve npm release information for testing checks: ${e.message}
|
|
1176
1624
|
// [W3039] Could not retrieve workflow run data for "${WORKFLOW_FILE_SHORT}": ${e.message}
|
|
1177
|
-
// [E3040]
|
|
1625
|
+
// [E3040] "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s).
|
|
1178
1626
|
// [W3041] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" was cancelled.
|
|
1179
|
-
// [S3042]
|
|
1180
|
-
// [S3043]
|
|
1181
|
-
// [S3044]
|
|
1182
|
-
// [S3045]
|
|
1627
|
+
// [S3042] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" with a pinned version. Consider locking only the major version.
|
|
1628
|
+
// [S3043] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" with a pinned version. Consider locking only the major version.
|
|
1629
|
+
// [S3044] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" with a pinned version. Consider locking only the major version.
|
|
1630
|
+
// [S3045] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true".
|
|
1631
|
+
// [W3046] "${WORKFLOW_FILE_SHORT}": job "${jobName}" step "${stepLabel}" uses "continue-on-error: true". Workflow test-and-release should abort if any error occurs; remove "continue-on-error".
|
|
1632
|
+
// [E3047] "${WORKFLOW_FILE_SHORT}": job "${jobName}" step "${stepLabel}" uses "continue-on-error: true". Workflow test-and-release should abort if any error occurs; remove "continue-on-error".
|
|
1633
|
+
// [W3048] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" step using "ioBroker/testing-action-check" specifies a command parameter that should not be changed.
|
|
1634
|
+
// [W3049] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" step using "ioBroker/testing-action-adapter" specifies "integration-test-command" that should not be changed.
|
|
1635
|
+
// [W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job / log found in the latest run. Cannot verify "npm run test:package" output.
|
|
1636
|
+
// [S3051] "${WORKFLOW_FILE_SHORT}": output of "testing-action-check" does not match expected defaults. Please check the log manually.
|
|
1637
|
+
// [W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job / log found in the latest run. Cannot verify "npm run test:integration" output.
|
|
1638
|
+
// [S3053] "${WORKFLOW_FILE_SHORT}": output of "testing-action-adapter" does not match expected defaults. Please check the log manually.
|
package/lib/M5600__I18n.js
CHANGED
|
@@ -34,7 +34,7 @@ const TRANSLATABLE_ATTRS = [
|
|
|
34
34
|
];
|
|
35
35
|
const MAX_W5612_WARNINGS = 10;
|
|
36
36
|
const MAX_W5606_EXAMPLES = 2;
|
|
37
|
-
const MIN_WORDS_FOR_W5606 =
|
|
37
|
+
const MIN_WORDS_FOR_W5606 = 5;
|
|
38
38
|
const MAX_56XX_ISSUES_PER_CODE = 10;
|
|
39
39
|
const ISSUE_CODE_56XX_REGEX = /^\[((?:E|W|S)56\d{2})\]/;
|
|
40
40
|
|
|
@@ -100,14 +100,28 @@ function escapeRegex(str) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* Count words in a text
|
|
103
|
+
* Count actual alphabetic words in a text.
|
|
104
|
+
* Only sequences of alphabetic characters (including accented Latin letters) are counted,
|
|
105
|
+
* so punctuation, brackets, and JSON-like syntax are ignored.
|
|
106
|
+
* This function is intentionally applied to English text only, so Latin Unicode
|
|
107
|
+
* coverage is sufficient.
|
|
104
108
|
*
|
|
105
109
|
* @param {string} text - Text to evaluate.
|
|
106
|
-
* @returns {number} - Number of words in the text.
|
|
110
|
+
* @returns {number} - Number of alphabetic words in the text.
|
|
107
111
|
*/
|
|
108
112
|
function countWords(text) {
|
|
109
|
-
const
|
|
110
|
-
return
|
|
113
|
+
const words = text.match(/[a-zA-Z\u00C0-\u024F]+/g);
|
|
114
|
+
return words ? words.length : 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Return true if the text contains a URL (http/https scheme or www. prefix).
|
|
119
|
+
*
|
|
120
|
+
* @param {string} text - Text to evaluate.
|
|
121
|
+
* @returns {boolean} - Whether a URL was found.
|
|
122
|
+
*/
|
|
123
|
+
function containsUrl(text) {
|
|
124
|
+
return /https?:\/\/|www\./.test(text);
|
|
111
125
|
}
|
|
112
126
|
|
|
113
127
|
/**
|
|
@@ -351,13 +365,14 @@ function checkI18nDirectory(context, i18nDir) {
|
|
|
351
365
|
);
|
|
352
366
|
}
|
|
353
367
|
|
|
354
|
-
// W5606: Language has untranslated entries identical to English (
|
|
368
|
+
// W5606: Language has untranslated entries identical to English (>3 words)
|
|
355
369
|
const identical = [...enKeys].filter(
|
|
356
370
|
k =>
|
|
357
371
|
langKeys.has(k) &&
|
|
358
372
|
typeof enTranslations[k] === 'string' &&
|
|
359
373
|
typeof langTranslations[k] === 'string' &&
|
|
360
|
-
|
|
374
|
+
!containsUrl(enTranslations[k]) &&
|
|
375
|
+
countWords(enTranslations[k]) > MIN_WORDS_FOR_W5606 &&
|
|
361
376
|
enTranslations[k] === langTranslations[k],
|
|
362
377
|
);
|
|
363
378
|
|
|
@@ -372,7 +387,7 @@ function checkI18nDirectory(context, i18nDir) {
|
|
|
372
387
|
|
|
373
388
|
if (untranslatedSummary.length > 0) {
|
|
374
389
|
context.warnings.push(
|
|
375
|
-
`[W5606] i18n "${displayDir}" seems to contain untranslated entries identical to English (
|
|
390
|
+
`[W5606] i18n "${displayDir}" seems to contain untranslated entries identical to English (>${
|
|
376
391
|
MIN_WORDS_FOR_W5606
|
|
377
392
|
} words). Affected languages: ${untranslatedSummary.map(formatW5606LanguageEntry).join('; ')}.`,
|
|
378
393
|
);
|
|
@@ -520,9 +535,11 @@ function checkJsonConfigTranslations(context, configFile, jsonConfig, i18nDir, w
|
|
|
520
535
|
}
|
|
521
536
|
}
|
|
522
537
|
|
|
523
|
-
//
|
|
524
|
-
// (skip when i18n is not set to avoid flooding adapters that use words.js or other mechanisms)
|
|
538
|
+
// W5619: i18n attribute missing - flag as it defaults to true which may be surprising
|
|
525
539
|
if (i18nMode === undefined || i18nMode === null) {
|
|
540
|
+
context.warnings.push(
|
|
541
|
+
`[S5619] "${displayConfig}" does not specify the "i18n" attribute. It defaults to true, which may be unintentional. Please explicitly add "i18n": true, "i18n": false, or a custom path.`,
|
|
542
|
+
);
|
|
526
543
|
return;
|
|
527
544
|
}
|
|
528
545
|
|
|
@@ -655,7 +672,7 @@ exports.getI18nFilesToRead = getI18nFilesToRead;
|
|
|
655
672
|
// [W5603] i18n directory is missing a non-required language
|
|
656
673
|
// [W5604] English translation key not present in another language (missing translation)
|
|
657
674
|
// [W5605] Translation key in non-English file not present in English (outdated translation)
|
|
658
|
-
// [W5606] Non-English translations identical to English (
|
|
675
|
+
// [W5606] Non-English translations identical to English (>3 words, no URL), grouped by affected language
|
|
659
676
|
// [E5610] jsonConfig translatable attribute i18n object missing a required language
|
|
660
677
|
// [W5611] jsonConfig translatable attribute i18n object missing a non-required language
|
|
661
678
|
// [W5612] jsonConfig translatable attribute string key not found in English translation file
|
|
@@ -664,3 +681,4 @@ exports.getI18nFilesToRead = getI18nFilesToRead;
|
|
|
664
681
|
// [W5616] jsonConfig has i18n enabled but a translatable attribute uses an inline i18n object
|
|
665
682
|
// [W5617] jsonConfig has i18n=false but a translatable attribute uses a plain string
|
|
666
683
|
// [E5618] "Custom path specified at i18n attribute (${customPath}) must end with '/i18n'
|
|
684
|
+
// [W5619] jsonConfig does not specify the "i18n" attribute (defaults to true)
|
package/lib/postprocessing.js
CHANGED
|
@@ -66,6 +66,9 @@ const mapSeverity4New = {
|
|
|
66
66
|
S3014: 'E', // [S3014] Workflow "test-and-release.yml": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.
|
|
67
67
|
W3019: 'E', // [W3019] Workflow "test-and-release.yml": job "deploy" step using "ioBroker/testing-action-deploy@v1" has "npm-token" parameter specified. Trusted publishing will not work while "npm-token" is set.
|
|
68
68
|
W3027: 'E', // [W3027] Workflow "test-and-release.yml": job "adapter-tests" OS matrix is missing: windows-latest, macos-latest. Consider adding tests for all of: ubuntu-latest, windows-latest, macos-latest
|
|
69
|
+
W3049: 'E', // [W3049] Workflow "test-and-release.yml": job "adapter-tests" step using "ioBroker/testing-action-adapter" specifies "integration-test-command". This command should not be changed; the default value should be used.
|
|
70
|
+
S3053: 'E', // [S3053] "test-and-release.yml": "testing-action-adapter" job "adapter-tests (22.x, macos-latest)" in [run #333](https://github.com/mosandlt/ioBroker.bosch-smart-home-camera/actions/runs/28146512000) does not log the expected defaults for "npm run test:integration". Please check the [log](https://github.com/mosandlt/ioBroker.bosch-smart-home-camera/actions/runs/28146512000/job/83354759586).
|
|
71
|
+
W3053: 'E', // [S3053] "test-and-release.yml": "testing-action-adapter" job "adapter-tests (22.x, macos-latest)" in [run #333](https://github.com/mosandlt/ioBroker.bosch-smart-home-camera/actions/runs/28146512000) does not log the expected defaults for "npm run test:integration". Please check the [log](https://github.com/mosandlt/ioBroker.bosch-smart-home-camera/actions/runs/28146512000/job/83354759586).
|
|
69
72
|
W5018: 'E', // [W5018] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.',
|
|
70
73
|
W5512: 'E', // [W5512] admin/jsonConfig.json schema validation error: ...
|
|
71
74
|
W5612: 'E', // W5612] "admin/jsonConfig.json/items/..." attribute "label" uses key "..." which is not found in the English translation file at "admin/i18n/en".
|
|
@@ -88,6 +91,7 @@ const mapSeverity4New = {
|
|
|
88
91
|
W5604: 'E', // [W5604] i18n "admin/i18n" language "de" is missing 4 key(s) present in English: Abfrageintervall (Sekunden),
|
|
89
92
|
W5606: 'E', // [W5606] i18n "admin/i18n" language "nl" has 169 translation(s) identical to English (i.e. baseConfiguration). This may indicate untranslated content.
|
|
90
93
|
W5611: 'E', // [W5611] "admin/jsonConfig.json/items/tab_region/items/country/options[0]" attribute "label" is missing language "uk" in i18n object.
|
|
94
|
+
S5619: 'E', // [S5619] "${displayConfig}" does not specify the "i18n" attribute. It defaults to true, which may be unintentional. Please explicitly add "i18n": true, "i18n": false, or a custom path.`,
|
|
91
95
|
S6008: 'E', // [S6008] Changelog for version 0.7.0-beta.19 should be added to README.md
|
|
92
96
|
S6020: 'W', // [S6020] Consider adding a CHANGELOG_OLD.md file to store older changelog entries. This is supported by @alcalzone/releasescript.
|
|
93
97
|
S6022: 'E', // [S6022] CHANGELOG_OLD.md exists but no link to it was found in README.md. Consider adding a link to CHANGELOG_OLD.md at the end of the Changelog section. S8901: 'W', // [S8901] Dependabot configuration file ".github/dependabot.yml" not found. Consider adding dependabot to keep dependencies up to date.
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.19.
|
|
2
|
+
"version": "5.19.2",
|
|
3
3
|
"name": "@iobroker/repochecker",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"ajv": "^8.20.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"js-yaml": "^4.1.1",
|
|
10
10
|
"json5": "^2.2.3",
|
|
11
11
|
"minimatch": "^10.0.0",
|
|
12
|
-
"semver": "^7.
|
|
12
|
+
"semver": "^7.8.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@alcalzone/release-script": "^5.2.0",
|