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 to maintain node version #8986

Merged
merged 7 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: 0 1 * * MON
workflow_dispatch:

env:
NODE_VERSION: lts/* # use the latest LTS release

jobs:
canary:
# prevents this action from running on forks
Expand All @@ -17,10 +20,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
permissions:
contents: read # to fetch code (actions/checkout)

env:
NODE_VERSION: lts/* # use the latest LTS release

jobs:
unit-test:
runs-on: ubuntu-latest
Expand All @@ -20,10 +23,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Skip Puppeteer download
Expand All @@ -43,10 +46,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Skip Puppeteer download
Expand Down Expand Up @@ -75,10 +78,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- run: pnpm install
Expand All @@ -95,10 +98,10 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Skip Puppeteer download
Expand Down