Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use '.node-version' file to configure node version used for CI #3489

Merged
merged 1 commit into from Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/canary.yaml
Expand Up @@ -5,8 +5,6 @@ on:
- CI
types:
- completed
env:
NODE_VERSION_USED_FOR_DEVELOPMENT: 17
jobs:
publish-canary:
runs-on: ubuntu-latest
Expand All @@ -22,7 +20,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'

Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
@@ -1,7 +1,5 @@
name: CI
on: [push, pull_request]
env:
NODE_VERSION_USED_FOR_DEVELOPMENT: 17
jobs:
save-github-event:
name: "Save `github.event` as an artifact to use in subsequent 'workflow_run' actions"
Expand All @@ -26,7 +24,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -75,7 +73,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -102,7 +100,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'
# We install bunch of packages during integration tests without locking them
# so we skip cache action to not pollute cache for other jobs.

Expand All @@ -125,7 +123,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -146,7 +144,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -204,7 +202,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -231,7 +229,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -260,7 +258,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -288,7 +286,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand All @@ -315,7 +313,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts
Expand Down
1 change: 1 addition & 0 deletions .node-version
@@ -0,0 +1 @@
v17