@iobroker/repochecker 5.19.1 → 5.19.3

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 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.3 (2026-06-28)
29
+
30
+ - (mcm1957) false positives for test-and.release workflow logs ans wwwOnly adapters has been fixed
31
+
32
+ ### 5.19.2 (2026-06-28)
33
+
34
+ - (mcm1957) suggest to always use i18n flag at jsonCOnfig.json
35
+ - (mcm1957) check of test-and.release workflow logs has been added
36
+
28
37
  ### 5.19.1 (2026-06-28)
29
38
 
30
39
  - (mcm1957) checking of untranslated i18n keys has been adapted
@@ -17,6 +17,95 @@ 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
+ '✔ The repository type is "git"',
41
+ '✔ npm is not listed as a dependency',
42
+ '✔ iobroker.js-controller is not listed as a dependency',
43
+ 'Check contents of io-package.json',
44
+ '✔ The property "common.name" exists',
45
+ '✔ The property "common.titleLang" exists',
46
+ '✔ The property "common.version" exists',
47
+ '✔ The property "common.news" exists',
48
+ '✔ The property "common.desc" exists',
49
+ '✔ The property "common.icon" exists',
50
+ '✔ The property "common.extIcon" exists',
51
+ '✔ The property "common.type" exists',
52
+ '✔ The property "common.authors" exists',
53
+ '✔ The property "native" exists',
54
+ '✔ The title does not contain "adapter" or "iobroker"',
55
+ '✔ titleLang is an object to support multiple languages',
56
+ '✔ titleLang does not contain "adapter" or "iobroker"',
57
+ '✔ The description is an object to support multiple languages',
58
+ '✔ common.authors is an array that is not empty',
59
+ '✔ common.news is an object that contains maximum 20 entries',
60
+ '✔ if common.licenseInformation exists, it is an object with required properties',
61
+ '✔ common.license should not exist together with common.licenseInformation',
62
+ '✔ common.tier must be 1, 2 or 3',
63
+ 'Compare contents of package.json and io-package.json',
64
+ '✔ The name matches',
65
+ '✔ The version matches',
66
+ '✔ The license matches',
67
+ 'Validate JSON files',
68
+ 'Base directory JSON files',
69
+ '✔ package.json contains valid JSON',
70
+ '✔ io-package.json contains valid JSON',
71
+ 'Check additional files',
72
+ '✔ README.md exists',
73
+ '✔ LICENSE exists or is present in the README.md',
74
+ 'passing',
75
+ ];
76
+
77
+ // Reference output lines for npm run test:integration (adapter-tests jobs).
78
+ // Each non-empty line must appear (as a substring) in the normalized job log.
79
+ // Timestamps are stripped; whitespace is normalised before comparison.
80
+ // Update this list when the @iobroker/testing package changes its test output.
81
+ const EXPECTED_TEST_INTEGRATION_LINES = [
82
+ 'testing:integration:AdapterSetup => done!',
83
+ 'testing:integration:DBConnection starting DB instances...',
84
+ 'testing:integration:DBConnection creating objects DB',
85
+ 'testing:integration:DBConnection => objects DB type: jsonl',
86
+ 'testing:integration:DBConnection => done!',
87
+ 'testing:integration:DBConnection creating states DB',
88
+ 'testing:integration:DBConnection => states DB type: jsonl',
89
+ 'testing:integration:DBConnection DB instances started',
90
+ 'testing:integration:ControllerSetup Moving databases to different ports...',
91
+ 'testing:integration:ControllerSetup => done!',
92
+ 'testing:integration:ControllerSetup Disabling admin instances...',
93
+ 'testing:integration:AdapterSetup Removing old adapter instances...',
94
+ 'testing:integration:AdapterSetup Adding adapter instance...',
95
+ 'testing:integration:DBConnection Stopping DB instances...',
96
+ 'testing:integration:DBConnection DB instances stopped',
97
+ 'testing:integration:DBConnection Creating DB backup...',
98
+ 'testing:integration:DBConnection No DB instance is running, nothing to stop...',
99
+ 'Adapter startup',
100
+ '✔ The adapter starts',
101
+ 'testing:integration:TestHarness Stopping adapter instance...',
102
+ 'testing:integration:TestHarness => giving it 5000ms to terminate',
103
+ 'testing:integration:TestHarness Adapter terminated',
104
+ 'testing:integration:DBConnection Stopping DB instances...',
105
+ 'testing:integration:DBConnection DB instances stopped',
106
+ 'passing',
107
+ ];
108
+
20
109
  function normalizeVersion(version) {
21
110
  return typeof version === 'string' ? version.trim().replace(/^v/, '') : '';
22
111
  }
@@ -69,7 +158,7 @@ function findTagTriggeredRun(workflowRuns, version, taggedVersion) {
69
158
  );
70
159
  }
71
160
 
72
- function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, codeBase, sourceLabel) {
161
+ async function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, codeBase, sourceLabel) {
73
162
  const tagRun = findTagTriggeredRun(workflowRuns, version, taggedVersion);
74
163
  if (!tagRun) {
75
164
  context.warnings.push(
@@ -81,19 +170,103 @@ function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, cod
81
170
 
82
171
  if (tagRun.conclusion === 'cancelled') {
83
172
  context.warnings.push(
84
- `[W${codeBase}] Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} was cancelled ${formatRunLink(tagRun)}.`,
173
+ `[W${codeBase}] "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} was cancelled ${formatRunLink(tagRun)}.`,
85
174
  );
86
175
  } else if (tagRun.conclusion === 'failure') {
87
176
  context.errors.push(
88
- `[W${codeBase}] Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} failed ${formatRunLink(tagRun)}.`,
177
+ `[W${codeBase}] "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} failed ${formatRunLink(tagRun)}.`,
89
178
  );
90
179
  } else {
91
180
  context.checks.push(
92
- `Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
181
+ `"${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
93
182
  );
94
183
  common.info(
95
- `Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
184
+ `"${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} finished with conclusion "${tagRun.conclusion}" ${formatRunLink(tagRun)}.`,
96
185
  );
186
+
187
+ // Check log content for check-and-lint and adapter-tests jobs
188
+ try {
189
+ const runJobs = await fetchRunJobs(context, tagRun.id);
190
+
191
+ // W3050 / S3051: check-and-lint job log
192
+ const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
193
+ if (!checkAndLintJob) {
194
+ context.warnings.push(
195
+ `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(tagRun)}. ` +
196
+ `Cannot verify "npm run test:package" output.`,
197
+ );
198
+ } else {
199
+ const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
200
+ if (!checkAndLintLog) {
201
+ context.warnings.push(
202
+ `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(tagRun)}.`,
203
+ );
204
+ } else {
205
+ const missingCheckLines = findMissingExpectedLines(EXPECTED_TEST_PACKAGE_LINES, checkAndLintLog);
206
+ if (missingCheckLines.length > 0) {
207
+ context.warnings.push(
208
+ `[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(tagRun)} ` +
209
+ `does not log the expected defaults for "npm run test:package". ` +
210
+ `Please check the [log](${checkAndLintJob.html_url})`,
211
+ );
212
+ if (common.isDebug()) {
213
+ common.debug(
214
+ `[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
215
+ );
216
+ }
217
+ } else {
218
+ context.checks.push(
219
+ `Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(tagRun)}.`,
220
+ );
221
+ }
222
+ }
223
+ }
224
+
225
+ // W3052 / S3053: adapter-tests job logs
226
+ if (!context.cfg.onlyWWW) {
227
+ const adapterTestJobs = runJobs.filter(
228
+ job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
229
+ );
230
+ if (adapterTestJobs.length === 0) {
231
+ context.warnings.push(
232
+ `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(tagRun)}. ` +
233
+ `Cannot verify "npm run test:integration" output.`,
234
+ );
235
+ } else {
236
+ for (const adapterJob of adapterTestJobs) {
237
+ const adapterLog = await fetchJobLog(context, adapterJob.id);
238
+ if (!adapterLog) {
239
+ context.warnings.push(
240
+ `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(tagRun)}.`,
241
+ );
242
+ } else {
243
+ const missingAdapterLines = findMissingExpectedLines(
244
+ EXPECTED_TEST_INTEGRATION_LINES,
245
+ adapterLog,
246
+ );
247
+ if (missingAdapterLines.length > 0) {
248
+ context.warnings.push(
249
+ `[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(tagRun)} ` +
250
+ `does not log the expected defaults for "npm run test:integration". ` +
251
+ `Please check the [log](${adapterJob.html_url}).`,
252
+ );
253
+ if (common.isDebug()) {
254
+ common.debug(
255
+ `[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
256
+ );
257
+ }
258
+ } else {
259
+ context.checks.push(
260
+ `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(tagRun)}.`,
261
+ );
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ } catch (e) {
268
+ common.debug(`Could not check job logs for run ${tagRun.id}: ${e.message}`);
269
+ }
97
270
  }
98
271
  }
99
272
 
@@ -462,6 +635,117 @@ function getAllowedRequiredOsSystems(osClause, requiredSystems, packageOsAliasMa
462
635
  return allowed;
463
636
  }
464
637
 
638
+ /**
639
+ * Normalises a single line from a GitHub Actions job log:
640
+ * - strips the leading ISO timestamp (e.g. "2024-01-01T00:00:00.0000000Z ")
641
+ * - strips ANSI escape codes
642
+ * - trims and collapses internal whitespace to a single space
643
+ *
644
+ * @param {string} line - raw log line
645
+ * @returns {string} normalised line
646
+ */
647
+ function normalizeLogLine(line) {
648
+ return line
649
+ .replace(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z\s/, '')
650
+ .replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '') // eslint-disable-line no-control-regex
651
+ .trim()
652
+ .replace(/\s+/g, ' ');
653
+ }
654
+
655
+ /**
656
+ * Splits a raw job log text into normalised, non-empty lines, filtering out
657
+ * GitHub Actions control sequences (lines starting with "##[").
658
+ *
659
+ * @param {string} logText - raw log text
660
+ * @returns {string[]} normalised lines
661
+ */
662
+ function extractNormalizedLogLines(logText) {
663
+ if (!logText || typeof logText !== 'string') {
664
+ return [];
665
+ }
666
+ return logText
667
+ .split('\n')
668
+ .map(normalizeLogLine)
669
+ .filter(line => line.length > 0 && !line.startsWith('##['));
670
+ }
671
+
672
+ /**
673
+ * Returns the subset of expectedLines that cannot be found in logText.
674
+ * Duplicate expected lines are checked only once.
675
+ * Comparison uses substring matching after whitespace normalisation.
676
+ *
677
+ * @param {string[]} expectedLines - reference lines to look for
678
+ * @param {string} logText - raw job log text
679
+ * @returns {string[]} missing lines (normalised)
680
+ */
681
+ function findMissingExpectedLines(expectedLines, logText) {
682
+ const normalizedLog = extractNormalizedLogLines(logText);
683
+ const missing = [];
684
+ const checked = new Set();
685
+
686
+ for (const expected of expectedLines) {
687
+ const normalizedExpected = expected.trim().replace(/\s+/g, ' ');
688
+ if (!normalizedExpected || checked.has(normalizedExpected)) {
689
+ continue;
690
+ }
691
+ checked.add(normalizedExpected);
692
+
693
+ const found = normalizedLog.some(logLine => logLine.includes(normalizedExpected));
694
+ if (!found) {
695
+ missing.push(normalizedExpected);
696
+ }
697
+ }
698
+ return missing;
699
+ }
700
+
701
+ /**
702
+ * Fetches the list of jobs for a workflow run (handles pagination).
703
+ *
704
+ * @param {object} context - checker context
705
+ * @param {number} runId - workflow run ID
706
+ * @returns {Promise<object[]>} array of job objects
707
+ */
708
+ async function fetchRunJobs(context, runId) {
709
+ const jobs = [];
710
+ let page = 1;
711
+ try {
712
+ while (true) {
713
+ const url = `${context.githubUrlApi}/actions/runs/${runId}/jobs?per_page=100&page=${page}`;
714
+ common.debug(`Retrieving jobs for run ${runId} (page ${page})`);
715
+ const response = await axios.get(url);
716
+ const jobsPage = response.data?.jobs ?? [];
717
+ jobs.push(...jobsPage);
718
+ if (jobsPage.length < 100) {
719
+ break;
720
+ }
721
+ page++;
722
+ }
723
+ } catch (e) {
724
+ common.debug(`Could not fetch jobs for run ${runId}: ${e.message}`);
725
+ }
726
+ return jobs;
727
+ }
728
+
729
+ /**
730
+ * Downloads the plain-text log for a single GitHub Actions job.
731
+ * The API redirects to a download URL; axios follows the redirect automatically.
732
+ *
733
+ * @param {object} context - checker context
734
+ * @param {number} jobId - job ID
735
+ * @returns {Promise<string|null>} log text or null on failure
736
+ */
737
+ async function fetchJobLog(context, jobId) {
738
+ const url = `${context.githubUrlApi}/actions/jobs/${jobId}/logs`;
739
+ try {
740
+ common.debug(`Fetching log for job ${jobId}`);
741
+ const response = await axios.get(url, { maxRedirects: 10, responseType: 'text' });
742
+ return typeof response.data === 'string' ? response.data : null;
743
+ } catch (e) {
744
+ common.debug(`Could not fetch log for job ${jobId}: ${e.message}`);
745
+ return null;
746
+ }
747
+ }
748
+
465
749
  async function checkTests(context) {
466
750
  console.log('\n[E3000 - E3999] checking tests');
467
751
 
@@ -543,7 +827,7 @@ async function checkTests(context) {
543
827
  // --- W3005: check for pull_request in 'on' ---
544
828
  if (!onAttr || !Object.prototype.hasOwnProperty.call(onAttr, 'pull_request')) {
545
829
  context.warnings.push(
546
- `[W3005] Workflow "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.`,
830
+ `[W3005] "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.`,
547
831
  );
548
832
  } else {
549
833
  context.checks.push('Workflow trigger includes "pull_request".');
@@ -552,7 +836,7 @@ async function checkTests(context) {
552
836
  // --- E3006 / E3007 / E3008: check for push in 'on' ---
553
837
  if (!onAttr || !Object.prototype.hasOwnProperty.call(onAttr, 'push')) {
554
838
  context.errors.push(
555
- `[E3006] Workflow "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.`,
839
+ `[E3006] "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.`,
556
840
  );
557
841
  } else {
558
842
  context.checks.push('Workflow trigger includes "push".');
@@ -563,7 +847,7 @@ async function checkTests(context) {
563
847
  const branches = pushConfig.branches;
564
848
  if (!branches || !Array.isArray(branches) || branches.length === 0) {
565
849
  context.errors.push(
566
- `[E3007] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration. ` +
850
+ `[E3007] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration. ` +
567
851
  `Must include "*" or the default branch ("${context.branch}").`,
568
852
  );
569
853
  } else {
@@ -572,7 +856,7 @@ async function checkTests(context) {
572
856
  const hasDefaultBranch = branches.includes(defaultBranch);
573
857
  if (!hasWildcard && !hasDefaultBranch) {
574
858
  context.errors.push(
575
- `[E3037] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch "${defaultBranch}". ` +
859
+ `[E3037] "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch "${defaultBranch}". ` +
576
860
  `Found: ${JSON.stringify(branches)}`,
577
861
  );
578
862
  } else {
@@ -585,7 +869,7 @@ async function checkTests(context) {
585
869
  const requiredTagPatterns = ['v[0-9]+.[0-9]+.[0-9]+', 'v[0-9]+.[0-9]+.[0-9]+-**'];
586
870
  if (!tags || !Array.isArray(tags)) {
587
871
  context.errors.push(
588
- `[E3008] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration. ` +
872
+ `[E3008] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration. ` +
589
873
  `Required tag patterns: ${requiredTagPatterns.join(', ')}`,
590
874
  );
591
875
  } else {
@@ -593,7 +877,7 @@ async function checkTests(context) {
593
877
  const missingPatterns = requiredTagPatterns.filter(pat => !cleanedTags.includes(pat));
594
878
  if (missingPatterns.length > 0) {
595
879
  context.errors.push(
596
- `[E3040] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s): ${missingPatterns.join(', ')}`,
880
+ `[E3040] "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s): ${missingPatterns.join(', ')}`,
597
881
  );
598
882
  } else {
599
883
  context.checks.push('Workflow "push" trigger tags are correctly configured.');
@@ -605,7 +889,7 @@ async function checkTests(context) {
605
889
  const concurrency = workflow.concurrency;
606
890
  if (!concurrency || concurrency.group !== '${{ github.ref }}' || concurrency['cancel-in-progress'] !== true) {
607
891
  context.warnings.push(
608
- `[W3009] Workflow "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration. See ` +
892
+ `[W3009] "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration. See ` +
609
893
  `"https://github.com/ioBroker/ioBroker.example/blob/e7db900495bb3c2b89dc35d863dda4ccf33f5def/JavaScript/.github/workflows/test-and-release.yml#L17" for details.`,
610
894
  );
611
895
  } else {
@@ -670,6 +954,93 @@ async function checkTests(context) {
670
954
  `Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" finished with conclusion "${lastRun.conclusion}" ${formatRunLink(lastRun)}.`,
671
955
  );
672
956
  }
957
+
958
+ // Check log content for check-and-lint and adapter-tests jobs
959
+ try {
960
+ const runJobs = await fetchRunJobs(context, lastRun.id);
961
+
962
+ // W3050 / S3051: check-and-lint job log
963
+ const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
964
+ if (!checkAndLintJob) {
965
+ context.warnings.push(
966
+ `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(lastRun)}. ` +
967
+ `Cannot verify "npm run test:package" output.`,
968
+ );
969
+ } else {
970
+ const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
971
+ if (!checkAndLintLog) {
972
+ context.warnings.push(
973
+ `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(lastRun)}.`,
974
+ );
975
+ } else {
976
+ const missingCheckLines = findMissingExpectedLines(
977
+ EXPECTED_TEST_PACKAGE_LINES,
978
+ checkAndLintLog,
979
+ );
980
+ if (missingCheckLines.length > 0) {
981
+ context.warnings.push(
982
+ `[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(lastRun)} ` +
983
+ `does not log the expected defaults for "npm run test:package". ` +
984
+ `Please check the [log](${checkAndLintJob.html_url}),`,
985
+ );
986
+ if (common.isDebug()) {
987
+ common.debug(
988
+ `[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
989
+ );
990
+ }
991
+ } else {
992
+ context.checks.push(
993
+ `Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(lastRun)}.`,
994
+ );
995
+ }
996
+ }
997
+ }
998
+
999
+ // W3052 / S3053: adapter-tests job logs
1000
+ if (!context.cfg.onlyWWW) {
1001
+ const adapterTestJobs = runJobs.filter(
1002
+ job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
1003
+ );
1004
+ if (adapterTestJobs.length === 0) {
1005
+ context.warnings.push(
1006
+ `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(lastRun)}. ` +
1007
+ `Cannot verify "npm run test:integration" output.`,
1008
+ );
1009
+ } else {
1010
+ for (const adapterJob of adapterTestJobs) {
1011
+ const adapterLog = await fetchJobLog(context, adapterJob.id);
1012
+ if (!adapterLog) {
1013
+ context.warnings.push(
1014
+ `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(lastRun)}.`,
1015
+ );
1016
+ } else {
1017
+ const missingAdapterLines = findMissingExpectedLines(
1018
+ EXPECTED_TEST_INTEGRATION_LINES,
1019
+ adapterLog,
1020
+ );
1021
+ if (missingAdapterLines.length > 0) {
1022
+ context.warnings.push(
1023
+ `[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(lastRun)} ` +
1024
+ `does not log the expected defaults for "npm run test:integration". ` +
1025
+ `Please check the [log](${adapterJob.html_url}).`,
1026
+ );
1027
+ if (common.isDebug()) {
1028
+ common.debug(
1029
+ `[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
1030
+ );
1031
+ }
1032
+ } else {
1033
+ context.checks.push(
1034
+ `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(lastRun)}.`,
1035
+ );
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ } catch (e) {
1042
+ common.debug(`Could not check job logs for run ${lastRun.id}: ${e.message}`);
1043
+ }
673
1044
  }
674
1045
 
675
1046
  const tagsResponse = await axios(`${context.githubUrlApi}/tags?per_page=100`);
@@ -687,7 +1058,7 @@ async function checkTests(context) {
687
1058
  `[W3032] Release ${currentRelease} from io-package.json/package.json has not yet been tagged. Tagging releases is required.`,
688
1059
  );
689
1060
  } else {
690
- checkTagTriggeredRun(
1061
+ await checkTagTriggeredRun(
691
1062
  context,
692
1063
  workflowRuns,
693
1064
  currentRelease,
@@ -717,7 +1088,7 @@ async function checkTests(context) {
717
1088
  `[E3034] Release ${npmLatestRelease} tagged as "latest" at npm has not yet been tagged at GitHub. Tagging of releases is required.`,
718
1089
  );
719
1090
  } else {
720
- checkTagTriggeredRun(
1091
+ await checkTagTriggeredRun(
721
1092
  context,
722
1093
  workflowRuns,
723
1094
  npmLatestRelease,
@@ -736,7 +1107,7 @@ async function checkTests(context) {
736
1107
  `[E3036] Newest npm release ${newestNpmRelease} has not yet been tagged at GitHub. Tagging of releases is required.`,
737
1108
  );
738
1109
  } else {
739
- checkTagTriggeredRun(
1110
+ await checkTagTriggeredRun(
740
1111
  context,
741
1112
  workflowRuns,
742
1113
  newestNpmRelease,
@@ -783,7 +1154,7 @@ async function checkTests(context) {
783
1154
 
784
1155
  const stepLabel = typeof step?.name === 'string' && step.name.trim() ? step.name.trim() : `#${i + 1}`;
785
1156
  const message =
786
- `Workflow "${WORKFLOW_FILE_SHORT}": job "${jobName}" step "${stepLabel}" uses "continue-on-error: true". ` +
1157
+ `"${WORKFLOW_FILE_SHORT}": job "${jobName}" step "${stepLabel}" uses "continue-on-error: true". ` +
787
1158
  'Workflow test-and-release should abort if any error occurs; remove "continue-on-error".';
788
1159
  if (protectedActionPrefixes.some(prefix => stepUsesActionPrefix(step, prefix))) {
789
1160
  context.errors.push(`[E3047] ${message}`);
@@ -826,11 +1197,11 @@ async function checkTests(context) {
826
1197
  common.debug(' job check-and-lint not found');
827
1198
  if (!context.cfg.onlyWWW) {
828
1199
  context.errors.push(
829
- `[E3010] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.`,
1200
+ `[E3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.`,
830
1201
  );
831
1202
  } else {
832
1203
  context.warnings.push(
833
- `[S3010] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.`,
1204
+ `[S3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.`,
834
1205
  );
835
1206
  }
836
1207
  } else {
@@ -842,7 +1213,7 @@ async function checkTests(context) {
842
1213
  const requiredCheckActionVersion = testingCfg['ioBroker/testing-action-check'];
843
1214
  if (!jobHasStepWithAction(jobs['check-and-lint'], checkActionPrefix)) {
844
1215
  context.warnings.push(
845
- `[W3013] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
1216
+ `[W3013] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
846
1217
  );
847
1218
  } else {
848
1219
  context.checks.push(
@@ -856,7 +1227,7 @@ async function checkTests(context) {
856
1227
  });
857
1228
  for (const lowerRef of lowerRefs) {
858
1229
  context.warnings.push(
859
- `[W3028] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" ` +
1230
+ `[W3028] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" ` +
860
1231
  `which is below the required version "${requiredCheckActionVersion}".`,
861
1232
  );
862
1233
  }
@@ -865,20 +1236,38 @@ async function checkTests(context) {
865
1236
  for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
866
1237
  const majorVersion = `v${parseActionMajorVersion(ref)}`;
867
1238
  context.warnings.push(
868
- `[S3042] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" ` +
1239
+ `[S3042] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" ` +
869
1240
  `with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
870
1241
  );
871
1242
  }
872
1243
 
873
1244
  if (!jobHasStepWithActionInputValue(jobs['check-and-lint'], checkActionPrefix, 'lint', true)) {
874
1245
  context.warnings.push(
875
- `[S3045] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true" for "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
1246
+ `[S3045] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true" for "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
876
1247
  );
877
1248
  } else {
878
1249
  context.checks.push(
879
1250
  `Job "check-and-lint" enables "lint: true" for "ioBroker/testing-action-check@${requiredCheckActionVersion}".`,
880
1251
  );
881
1252
  }
1253
+
1254
+ // W3048: check-and-lint should not override default commands in testing-action-check
1255
+ const forbiddenCheckParams = ['type-checking-command', 'lint-command', 'test-command'];
1256
+ for (const param of forbiddenCheckParams) {
1257
+ const stepWithParam = jobs['check-and-lint'].steps.find(
1258
+ step =>
1259
+ typeof step.uses === 'string' &&
1260
+ step.uses.startsWith(checkActionPrefix) &&
1261
+ step.with &&
1262
+ Object.prototype.hasOwnProperty.call(step.with, param),
1263
+ );
1264
+ if (stepWithParam) {
1265
+ context.warnings.push(
1266
+ `[W3048] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" step using "ioBroker/testing-action-check" ` +
1267
+ `specifies "${param}". This command should not be changed; the default value should be used.`,
1268
+ );
1269
+ }
1270
+ }
882
1271
  }
883
1272
 
884
1273
  // E3020 / S3021: check node.js version for check-and-lint job
@@ -886,13 +1275,13 @@ async function checkTests(context) {
886
1275
  if (checkLintNodeVersion !== null) {
887
1276
  if (checkLintNodeVersion < effectiveMinCheckAndLint) {
888
1277
  context.errors.push(
889
- `[E3020] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} ` +
1278
+ `[E3020] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} ` +
890
1279
  `which is below the minimum required version ${effectiveMinCheckAndLint}. ` +
891
1280
  `Please update to node.js ${effectiveRecCheckAndLint}.`,
892
1281
  );
893
1282
  } else if (checkLintNodeVersion < effectiveRecCheckAndLint) {
894
1283
  context.warnings.push(
895
- `[S3021] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. ` +
1284
+ `[S3021] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. ` +
896
1285
  `Consider updating to the recommended version ${effectiveRecCheckAndLint}.`,
897
1286
  );
898
1287
  } else {
@@ -909,9 +1298,7 @@ async function checkTests(context) {
909
1298
  context.checks.push('Job "adapter-tests" check skipped (onlyWWW adapter).');
910
1299
  } else if (!jobs['adapter-tests']) {
911
1300
  common.debug(' job adapter-tests not found');
912
- context.errors.push(
913
- `[E3011] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.`,
914
- );
1301
+ context.errors.push(`[E3011] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.`);
915
1302
  } else {
916
1303
  common.debug(' job adapter-tests found');
917
1304
  context.checks.push('Job "adapter-tests" found.');
@@ -919,7 +1306,7 @@ async function checkTests(context) {
919
1306
  // S3014: adapter-tests should need check-and-lint
920
1307
  if (!jobNeedsAll(jobs['adapter-tests'], ['check-and-lint'])) {
921
1308
  context.warnings.push(
922
- `[S3014] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.`,
1309
+ `[S3014] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.`,
923
1310
  );
924
1311
  } else {
925
1312
  context.checks.push('Job "adapter-tests" correctly requires "check-and-lint".');
@@ -930,7 +1317,7 @@ async function checkTests(context) {
930
1317
  const requiredAdapterActionVersion = testingCfg['ioBroker/testing-action-adapter'];
931
1318
  if (!jobHasStepWithAction(jobs['adapter-tests'], adapterActionPrefix)) {
932
1319
  context.warnings.push(
933
- `[W3015] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".`,
1320
+ `[W3015] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".`,
934
1321
  );
935
1322
  } else {
936
1323
  context.checks.push(
@@ -944,7 +1331,7 @@ async function checkTests(context) {
944
1331
  });
945
1332
  for (const lowerRef of lowerRefs) {
946
1333
  context.warnings.push(
947
- `[W3029] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" ` +
1334
+ `[W3029] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" ` +
948
1335
  `which is below the required version "${requiredAdapterActionVersion}".`,
949
1336
  );
950
1337
  }
@@ -953,10 +1340,25 @@ async function checkTests(context) {
953
1340
  for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
954
1341
  const majorVersion = `v${parseActionMajorVersion(ref)}`;
955
1342
  context.warnings.push(
956
- `[S3043] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" ` +
1343
+ `[S3043] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" ` +
957
1344
  `with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
958
1345
  );
959
1346
  }
1347
+
1348
+ // W3049: adapter-tests should not override integration-test-command in testing-action-adapter
1349
+ const adapterStepWithParam = jobs['adapter-tests'].steps.find(
1350
+ step =>
1351
+ typeof step.uses === 'string' &&
1352
+ step.uses.startsWith(adapterActionPrefix) &&
1353
+ step.with &&
1354
+ Object.prototype.hasOwnProperty.call(step.with, 'integration-test-command'),
1355
+ );
1356
+ if (adapterStepWithParam) {
1357
+ context.warnings.push(
1358
+ `[W3049] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" step using "ioBroker/testing-action-adapter" ` +
1359
+ `specifies "integration-test-command". This command should not be changed; the default value should be used.`,
1360
+ );
1361
+ }
960
1362
  }
961
1363
 
962
1364
  // W3024 / E3025 / W3026: check node.js version matrix for adapter-tests
@@ -977,7 +1379,7 @@ async function checkTests(context) {
977
1379
  const invalidVersions = matrixNodeVersions.filter(v => !validVersionNums.includes(v));
978
1380
  for (const v of invalidVersions) {
979
1381
  context.warnings.push(
980
- `[W3024] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} ` +
1382
+ `[W3024] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} ` +
981
1383
  `which is not in the list of recommended testing versions (${testingCfg.validMatrixNodeVersions.join(', ')}).`,
982
1384
  );
983
1385
  }
@@ -986,7 +1388,7 @@ async function checkTests(context) {
986
1388
  const missingRequired = requiredVersionNums.filter(v => !matrixNodeVersions.includes(v));
987
1389
  for (const v of missingRequired) {
988
1390
  context.errors.push(
989
- `[E3025] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}. ` +
1391
+ `[E3025] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}. ` +
990
1392
  `Tests with node.js ${v} are required.`,
991
1393
  );
992
1394
  }
@@ -997,7 +1399,7 @@ async function checkTests(context) {
997
1399
  );
998
1400
  for (const v of missingRecommended) {
999
1401
  context.warnings.push(
1000
- `[W3026] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}. ` +
1402
+ `[W3026] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}. ` +
1001
1403
  `Consider adding tests with node.js ${v}.`,
1002
1404
  );
1003
1405
  }
@@ -1043,7 +1445,7 @@ async function checkTests(context) {
1043
1445
  const uncoveredMissingSystems = missingSystems.filter(system => allowedSystems.has(system));
1044
1446
  if (uncoveredMissingSystems.length > 0) {
1045
1447
  context.warnings.push(
1046
- `[W3027] Workflow "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems.join(', ')} is missing in job "adapter-tests". ` +
1448
+ `[W3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems.join(', ')} is missing in job "adapter-tests". ` +
1047
1449
  `Add corresponding tests to "${WORKFLOW_FILE_SHORT}" or adapt package.json "os" accordingly.`,
1048
1450
  );
1049
1451
  } else {
@@ -1058,7 +1460,7 @@ async function checkTests(context) {
1058
1460
  if (!jobs['deploy']) {
1059
1461
  common.debug(' job deploy found');
1060
1462
  context.warnings.push(
1061
- `[S3012] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.`,
1463
+ `[S3012] "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.`,
1062
1464
  );
1063
1465
  } else {
1064
1466
  common.debug(' job deploy found');
@@ -1069,7 +1471,7 @@ async function checkTests(context) {
1069
1471
  const requiredDependencies = ['check-and-lint', 'adapter-tests'].filter(j => jobs[j]);
1070
1472
  if (!requiredDependencies.every(req => jobDependsOn(jobs, 'deploy', req))) {
1071
1473
  context.errors.push(
1072
- `[E3016] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".`,
1474
+ `[E3016] "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".`,
1073
1475
  );
1074
1476
  } else {
1075
1477
  context.checks.push('Job "deploy" correctly requires "check-and-lint" and "adapter-tests".');
@@ -1080,7 +1482,7 @@ async function checkTests(context) {
1080
1482
  const requiredDeployActionVersion = testingCfg['ioBroker/testing-action-deploy'];
1081
1483
  if (!jobHasStepWithAction(jobs['deploy'], deployActionPrefix)) {
1082
1484
  context.warnings.push(
1083
- `[W3017] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".`,
1485
+ `[W3017] "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".`,
1084
1486
  );
1085
1487
  } else {
1086
1488
  context.checks.push(
@@ -1094,7 +1496,7 @@ async function checkTests(context) {
1094
1496
  });
1095
1497
  for (const lowerRef of lowerRefs) {
1096
1498
  context.warnings.push(
1097
- `[W3030] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" ` +
1499
+ `[W3030] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" ` +
1098
1500
  `which is below the required version "${requiredDeployActionVersion}".`,
1099
1501
  );
1100
1502
  }
@@ -1103,7 +1505,7 @@ async function checkTests(context) {
1103
1505
  for (const ref of usedRefs.filter(isOverlySpecificVersionRef)) {
1104
1506
  const majorVersion = `v${parseActionMajorVersion(ref)}`;
1105
1507
  context.warnings.push(
1106
- `[S3044] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" ` +
1508
+ `[S3044] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" ` +
1107
1509
  `with a pinned version. Consider locking only the major version "@${majorVersion}" instead.`,
1108
1510
  );
1109
1511
  }
@@ -1114,7 +1516,7 @@ async function checkTests(context) {
1114
1516
  const hasIdTokenWrite = permissions && permissions['id-token'] === 'write';
1115
1517
  if (!hasContentsWrite || !hasIdTokenWrite) {
1116
1518
  context.warnings.push(
1117
- `[S3018] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level. ` +
1519
+ `[S3018] "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level. ` +
1118
1520
  `Trusted publishing will not work without them.`,
1119
1521
  );
1120
1522
  } else {
@@ -1133,7 +1535,7 @@ async function checkTests(context) {
1133
1535
  Object.prototype.hasOwnProperty.call(deployStep.with, 'npm-token')
1134
1536
  ) {
1135
1537
  context.warnings.push(
1136
- `[W3019] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" ` +
1538
+ `[W3019] "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" ` +
1137
1539
  `has "npm-token" parameter specified. ` +
1138
1540
  `Trusted publishing will not work while "npm-token" is set.`,
1139
1541
  );
@@ -1147,13 +1549,13 @@ async function checkTests(context) {
1147
1549
  if (deployNodeVersion !== null) {
1148
1550
  if (deployNodeVersion < effectiveMinDeploy) {
1149
1551
  context.errors.push(
1150
- `[E3022] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} ` +
1552
+ `[E3022] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} ` +
1151
1553
  `which is below the minimum required version ${effectiveMinDeploy}. ` +
1152
1554
  `Please update to node.js ${effectiveRecDeploy}.`,
1153
1555
  );
1154
1556
  } else if (deployNodeVersion < effectiveRecDeploy) {
1155
1557
  context.warnings.push(
1156
- `[S3023] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. ` +
1558
+ `[S3023] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. ` +
1157
1559
  `Consider updating to the recommended version ${effectiveRecDeploy}.`,
1158
1560
  );
1159
1561
  } else {
@@ -1178,33 +1580,33 @@ exports.checkTests = checkTests;
1178
1580
  // [E3002] Workflow file "${WORKFLOW_FILE}" not found. Please create it for standard CI/CD testing.
1179
1581
  // [E3003] Workflow file "${WORKFLOW_FILE}" could not be read, is empty, not valid YAML, or does not contain valid workflow content.
1180
1582
  // [W3004] Workflow "name" in "${WORKFLOW_FILE_SHORT}" must be "Test and Release".
1181
- // [W3005] Workflow "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.
1182
- // [E3006] Workflow "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.
1183
- // [E3007] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration.
1184
- // [E3008] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration.
1185
- // [W3009] Workflow "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration.
1186
- // [S3010] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.
1187
- // [E3010] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.
1188
- // [E3011] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.
1189
- // [S3012] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.
1190
- // [W3013] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".
1191
- // [S3014] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.
1192
- // [W3015] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".
1193
- // [E3016] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".
1194
- // [W3017] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".
1195
- // [S3018] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level.
1196
- // [W3019] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" has "npm-token" parameter specified.
1197
- // [E3020] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} which is below the minimum required version.
1198
- // [S3021] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. Consider updating.
1199
- // [E3022] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} which is below the minimum required version.
1200
- // [S3023] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. Consider updating.
1201
- // [W3024] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} which is below the minimum required version.
1202
- // [E3025] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}.
1203
- // [W3026] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}.
1204
- // [W3027] Workflow "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems} is missing.
1205
- // [W3028] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" which is below the required version.
1206
- // [W3029] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" which is below the required version.
1207
- // [W3030] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" which is below the required version.
1583
+ // [W3005] "${WORKFLOW_FILE_SHORT}" should have "pull_request: {}" in the "on" trigger configuration.
1584
+ // [E3006] "${WORKFLOW_FILE_SHORT}" is missing the "push" trigger in the "on" configuration.
1585
+ // [E3007] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "branches" configuration.
1586
+ // [E3008] "${WORKFLOW_FILE_SHORT}": "push" trigger is missing "tags" configuration.
1587
+ // [W3009] "${WORKFLOW_FILE_SHORT}" is missing recommended concurrency configuration.
1588
+ // [S3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Consider adding it.
1589
+ // [E3010] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.
1590
+ // [E3011] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.
1591
+ // [S3012] "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.
1592
+ // [W3013] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should contain a step using "ioBroker/testing-action-check@${requiredCheckActionVersion}".
1593
+ // [S3014] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should declare "needs: check-and-lint" to run after linting.
1594
+ // [W3015] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" should contain a step using "ioBroker/testing-action-adapter@${requiredAdapterActionVersion}".
1595
+ // [E3016] "${WORKFLOW_FILE_SHORT}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".
1596
+ // [W3017] "${WORKFLOW_FILE_SHORT}": job "deploy" should contain a step using "ioBroker/testing-action-deploy@${requiredDeployActionVersion}".
1597
+ // [S3018] "${WORKFLOW_FILE_SHORT}": job "deploy" is missing required permissions "contents: write" and "id-token: write" at job level.
1598
+ // [W3019] "${WORKFLOW_FILE_SHORT}": job "deploy" step using "ioBroker/testing-action-deploy@v1" has "npm-token" parameter specified.
1599
+ // [E3020] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion} which is below the minimum required version.
1600
+ // [S3021] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses node.js ${checkLintNodeVersion}. Consider updating.
1601
+ // [E3022] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion} which is below the minimum required version.
1602
+ // [S3023] "${WORKFLOW_FILE_SHORT}": job "deploy" uses node.js ${deployNodeVersion}. Consider updating.
1603
+ // [W3024] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix uses node.js ${v} which is below the minimum required version.
1604
+ // [E3025] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing required node.js version ${v}.
1605
+ // [W3026] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" matrix is missing recommended node.js version ${v}.
1606
+ // [W3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems} is missing.
1607
+ // [W3028] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${lowerRef}" which is below the required version.
1608
+ // [W3029] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${lowerRef}" which is below the required version.
1609
+ // [W3030] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${lowerRef}" which is below the required version.
1208
1610
  // [W3031] No workflow runs found for "${WORKFLOW_FILE_SHORT}".
1209
1611
  // [E3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" failed.
1210
1612
  // [S3031] package.json "os" excludes required OS systems.
@@ -1213,14 +1615,20 @@ exports.checkTests = checkTests;
1213
1615
  // [E3034] Release ${npmLatestRelease} tagged as "latest" at npm has not yet been tagged at GitHub. Tagging of releases is required.
1214
1616
  // [W3035] No workflow run for "${WORKFLOW_FILE_SHORT}" triggered by tag "${taggedVersion}" was found for ...
1215
1617
  // [E3036] Newest npm release ${newestNpmRelease} has not yet been tagged at GitHub. Tagging of releases is required.
1216
- // [E3037] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch.
1618
+ // [E3037] "${WORKFLOW_FILE_SHORT}": "push" trigger "branches" must include "*" or the default branch.
1217
1619
  // [W3038] Could not retrieve npm release information for testing checks: ${e.message}
1218
1620
  // [W3039] Could not retrieve workflow run data for "${WORKFLOW_FILE_SHORT}": ${e.message}
1219
- // [E3040] Workflow "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s).
1621
+ // [E3040] "${WORKFLOW_FILE_SHORT}": "push" trigger "tags" is missing required pattern(s).
1220
1622
  // [W3041] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" was cancelled.
1221
- // [S3042] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" with a pinned version. Consider locking only the major version.
1222
- // [S3043] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" with a pinned version. Consider locking only the major version.
1223
- // [S3044] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" with a pinned version. Consider locking only the major version.
1224
- // [S3045] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true".
1225
- // [W3046] Workflow "${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".
1226
- // [E3047] Workflow "${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".
1623
+ // [S3042] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" uses "ioBroker/testing-action-check@${ref}" with a pinned version. Consider locking only the major version.
1624
+ // [S3043] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" uses "ioBroker/testing-action-adapter@${ref}" with a pinned version. Consider locking only the major version.
1625
+ // [S3044] "${WORKFLOW_FILE_SHORT}": job "deploy" uses "ioBroker/testing-action-deploy@${ref}" with a pinned version. Consider locking only the major version.
1626
+ // [S3045] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" should enable linting by setting "lint: true".
1627
+ // [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".
1628
+ // [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".
1629
+ // [W3048] "${WORKFLOW_FILE_SHORT}": job "check-and-lint" step using "ioBroker/testing-action-check" specifies a command parameter that should not be changed.
1630
+ // [W3049] "${WORKFLOW_FILE_SHORT}": job "adapter-tests" step using "ioBroker/testing-action-adapter" specifies "integration-test-command" that should not be changed.
1631
+ // [W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job / log found in the latest run. Cannot verify "npm run test:package" output.
1632
+ // [S3051] "${WORKFLOW_FILE_SHORT}": output of "testing-action-check" does not match expected defaults. Please check the log manually.
1633
+ // [W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job / log found in the latest run. Cannot verify "npm run test:integration" output.
1634
+ // [S3053] "${WORKFLOW_FILE_SHORT}": output of "testing-action-adapter" does not match expected defaults. Please check the log manually.
@@ -535,9 +535,11 @@ function checkJsonConfigTranslations(context, configFile, jsonConfig, i18nDir, w
535
535
  }
536
536
  }
537
537
 
538
- // Scan for translatable attributes only when i18n is explicitly configured
539
- // (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
540
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
+ );
541
543
  return;
542
544
  }
543
545
 
@@ -679,3 +681,4 @@ exports.getI18nFilesToRead = getI18nFilesToRead;
679
681
  // [W5616] jsonConfig has i18n enabled but a translatable attribute uses an inline i18n object
680
682
  // [W5617] jsonConfig has i18n=false but a translatable attribute uses a plain string
681
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)
@@ -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.1",
2
+ "version": "5.19.3",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",