Skip to content

Commit

Permalink
Merge pull request #1029 from arduino/engine
Browse files Browse the repository at this point in the history
Use engines.node as source of version data for actions/setup-node action
  • Loading branch information
per1234 authored Aug 1, 2024
2 parents f6a7bd0 + a57ecf9 commit 397c82f
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 48 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/check-action-metadata-task.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Check Action Metadata

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 20.x

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-action-metadata-task.ya?ml"
- ".npmrc"
- "action.ya?ml"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
pull_request:
paths:
- ".github/workflows/check-action-metadata-task.ya?ml"
- ".npmrc"
- "action.ya?ml"
- "package.json"
- "package-lock.json"
Expand All @@ -37,7 +35,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/check-markdown-task.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
name: Check Markdown

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 16.x

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-markdown-task.ya?ml"
- ".markdown-link-check.json"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -23,6 +20,7 @@ on:
paths:
- ".github/workflows/check-markdown-task.ya?ml"
- ".markdown-link-check.json"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -48,7 +46,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Initialize markdownlint-cli problem matcher
uses: xt0rted/markdownlint-problem-matcher@v3
Expand All @@ -72,7 +70,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/check-npm-dependencies-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-dependencies-task.md
name: Check npm Dependencies

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 20.x

# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
on:
create:
Expand All @@ -16,6 +12,7 @@ on:
- ".licensed.ya?ml"
- "Taskfile.ya?ml"
- "**/.gitmodules"
- "**/.npmrc"
- "**/package.json"
- "**/package-lock.json"
pull_request:
Expand All @@ -26,6 +23,7 @@ on:
- ".licensed.ya?ml"
- "Taskfile.ya?ml"
- "**/.gitmodules"
- "**/.npmrc"
- "**/package.json"
- "**/package-lock.json"
schedule:
Expand Down Expand Up @@ -78,7 +76,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down Expand Up @@ -128,7 +126,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/check-npm-task.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-task.md
name: Check npm

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 16.x

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-npm-task.ya?ml"
- "**/.npmrc"
- "**/package.json"
- "**/package-lock.json"
- "Taskfile.ya?ml"
pull_request:
paths:
- ".github/workflows/check-npm-task.ya?ml"
- "**/.npmrc"
- "**/package.json"
- "**/package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -39,7 +37,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand All @@ -60,7 +58,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/check-prettier-formatting-task.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md
name: Check Prettier Formatting

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 20.x

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-prettier-formatting-task.ya?ml"
- "Taskfile.ya?ml"
- "**/.npmrc"
- "**/.prettierignore"
- "**/.prettierrc*"
# CSS
Expand Down Expand Up @@ -107,6 +104,7 @@ on:
paths:
- ".github/workflows/check-prettier-formatting-task.ya?ml"
- "Taskfile.ya?ml"
- "**/.npmrc"
- "**/.prettierignore"
- "**/.prettierrc*"
# CSS
Expand Down Expand Up @@ -213,7 +211,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/check-tsconfig-task.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
name: Check TypeScript Configuration

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 16.x

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-tsconfig-task.ya?ml"
- "**/tsconfig*.json"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
pull_request:
paths:
- ".github/workflows/check-tsconfig-task.ya?ml"
- "**/tsconfig*.json"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand Down Expand Up @@ -45,7 +43,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/check-typescript-task.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Check TypeScript

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 20.x

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-typescript-task.ya?ml"
- ".eslintignore"
- "**/.eslintrc*"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -25,6 +22,7 @@ on:
- ".github/workflows/check-typescript-task.ya?ml"
- ".eslintignore"
- "**/.eslintrc*"
- ".npmrc"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -51,7 +49,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync-labels-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
name: Sync Labels

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 16.x
CONFIGURATIONS_FOLDER: .github/label-configuration-files
CONFIGURATIONS_ARTIFACT: label-configuration-files

Expand All @@ -13,12 +11,14 @@ on:
paths:
- ".github/workflows/sync-labels-npm.ya?ml"
- ".github/label-configuration-files/*.ya?ml"
- ".npmrc"
- "package.json"
- "package-lock.json"
pull_request:
paths:
- ".github/workflows/sync-labels-npm.ya?ml"
- ".github/label-configuration-files/*.ya?ml"
- ".npmrc"
- "package.json"
- "package-lock.json"
schedule:
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Download JSON schema for labels configuration file
id: download-schema
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Merge label configuration files
run: |
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test-typescript-task.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Test TypeScript

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 20.x

on:
push:
paths:
- ".github/workflows/test-typescript-task.ya?ml"
- ".npmrc"
- "jest.config.js"
- "package.json"
- "package-lock.json"
Expand All @@ -21,6 +18,7 @@ on:
pull_request:
paths:
- ".github/workflows/test-typescript-task.ya?ml"
- ".npmrc"
- "jest.config.js"
- "package.json"
- "package-lock.json"
Expand Down Expand Up @@ -54,7 +52,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand All @@ -75,7 +73,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# See: https://docs.npmjs.com/cli/configuring-npm/npmrc

engine-strict = true
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
"strip-json-comments-cli": "^3.0.0",
"ts-jest": "^28.0.8",
"typescript": "^5.5.4"
},
"engines": {
"node": "20.x"
}
}

0 comments on commit 397c82f

Please sign in to comment.