Skip to content

Commit

Permalink
ci: use '.node-version' file to configure node version used for CI (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 9, 2022
1 parent 21b926a commit 454c31e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
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

0 comments on commit 454c31e

Please sign in to comment.