Skip to content

Commit 274a967

Browse files
committed
Use standard Node.js version in validation workflows
These GitHub Actions workflows use the ajv-cli JSON schema validation tool to validate data files against their JSON schema. ajv-cli is an npm package-based tool. A standard major version of Node.js, and thus its bundled npm should be used for all development and maintenance operations. Previously, these workflows did not explicitly configure the version of Node.js that should be used in the runner machine, so whatever version happened to be installed in the runner by default was used. That version doesn't necessarily match with the intended version, and the version could change at any moment, so this risked instability in the project infrastructure.
1 parent 79def61 commit 274a967

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

.github/workflows/check-dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ on:
55
push:
66
paths:
77
- ".github/workflows/check-dependabot.yml"
8+
- "package.json"
9+
- "package-lock.json"
810
- "Taskfile.ya?ml"
911
- "**/dependabot.ya?ml"
1012
pull_request:
1113
paths:
1214
- ".github/workflows/check-dependabot.yml"
15+
- "package.json"
16+
- "package-lock.json"
1317
- "Taskfile.ya?ml"
1418
- "**/dependabot.ya?ml"
1519
schedule:
@@ -27,6 +31,11 @@ jobs:
2731
- name: Checkout repository
2832
uses: actions/checkout@v4
2933

34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: package.json
38+
3039
- name: Install Task
3140
uses: arduino/setup-task@v2
3241
with:

.github/workflows/check-issue-templates.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
paths:
77
- ".github/workflows/check-issue-templates.yml"
88
- "issue-templates/forms/**.ya?ml"
9+
- "package.json"
10+
- "package-lock.json"
911
- "Taskfile.ya?ml"
1012
pull_request:
1113
paths:
1214
- ".github/workflows/check-issue-templates.yml"
1315
- "issue-templates/forms/**.ya?ml"
16+
- "package.json"
17+
- "package-lock.json"
1418
- "Taskfile.ya?ml"
1519
schedule:
1620
# Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
@@ -27,6 +31,11 @@ jobs:
2731
- name: Checkout repository
2832
uses: actions/checkout@v4
2933

34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: package.json
38+
3039
- name: Install Task
3140
uses: arduino/setup-task@v2
3241
with:

.github/workflows/check-labels.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77
- ".github/workflows/check-labels.yml"
88
- "workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json"
99
- "workflow-templates/assets/sync-labels/*.ya?ml"
10+
- "package.json"
11+
- "package-lock.json"
1012
- "Taskfile.ya?ml"
1113
pull_request:
1214
paths:
1315
- ".github/workflows/check-labels.yml"
1416
- "workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json"
1517
- "workflow-templates/assets/sync-labels/*.ya?ml"
18+
- "package.json"
19+
- "package-lock.json"
1620
- "Taskfile.ya?ml"
1721
schedule:
1822
# Run periodically to catch breakage caused by external changes.
@@ -29,6 +33,11 @@ jobs:
2933
- name: Checkout repository
3034
uses: actions/checkout@v4
3135

36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version-file: package.json
40+
3241
- name: Install Task
3342
uses: arduino/setup-task@v2
3443
with:

.github/workflows/check-markdownlint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ on:
55
push:
66
paths:
77
- ".github/workflows/check-markdownlint.yml"
8+
- "package.json"
9+
- "package-lock.json"
810
- "Taskfile.ya?ml"
911
- "**/.markdownlint*"
1012
pull_request:
1113
paths:
1214
- ".github/workflows/check-markdownlint.yml"
15+
- "package.json"
16+
- "package-lock.json"
1317
- "Taskfile.ya?ml"
1418
- "**/.markdownlint*"
1519
schedule:
@@ -27,6 +31,11 @@ jobs:
2731
- name: Checkout repository
2832
uses: actions/checkout@v4
2933

34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: package.json
38+
3039
- name: Install Task
3140
uses: arduino/setup-task@v2
3241
with:

0 commit comments

Comments
 (0)