Skip to content

Commit

Permalink
chore: use node 18 (DIYgod#11093)
Browse files Browse the repository at this point in the history
* chore: use node 18

npm pushlish will still use node 16

* fix: openssl3 workaround

* fix: exit cleanly for node 18
  • Loading branch information
TonyRL authored Oct 14, 2022
1 parent ed08cef commit 4fef0bb
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js v16
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- name: Build file
run: yarn && npm run build:all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-on-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # just need its cache
with:
node-version: 16
node-version: 18
cache: 'yarn'
- name: Install dependencies (yarn) # needed since we need to parse markdown, so we also use got instead
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- run: yarn install
- run: npm run format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js v16
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'

- name: Install dependencies (yarn)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-deploy-route-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- uses: actions/setup-node@v3 # just need its cache
if: (env.TEST_CONTINUE)
with:
node-version: 16
node-version: 18
cache: 'yarn'

- name: Install dependencies (yarn) # `got` needed since `github.request` disallows HTTP requests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- run: yarn
- name: Lint
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- run: yarn
- name: Lint
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/scrape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js v16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies (yarn)
run: yarn
- name: Pull image
run: docker pull getmeili/docs-scraper
- name: Wait for Netlify to finish
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
- 6379/tcp
options: --entrypoint redis-server
strategy:
fail-fast: false
matrix:
node-version: [ 14, 16 ]
node-version: [ 14, 16, 18 ]
name: Jest on Node ${{ matrix.node-version }}
steps:
- name: Collect Workflow Telemetry
Expand All @@ -49,7 +50,7 @@ jobs:
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- name: Upload coverage to Codecov
if: ${{ matrix.node-version == '16' }}
if: ${{ matrix.node-version == '18' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken
Expand All @@ -68,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 14, 16 ]
node-version: [ 14, 16, 18 ]
chromium:
- name: bundled Chromium
dependency: ''
Expand Down Expand Up @@ -108,8 +109,9 @@ jobs:
docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 14, 16 ]
node-version: [ 14, 16, 18 ]
name: Build docs on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
Expand All @@ -118,14 +120,21 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn
- name: Set environment variable for Node v18
if: ${{ matrix.node-version == '18' }}
run: echo "NODE_OPTIONS=--openssl-legacy-provider" >> $GITHUB_ENV
- name: Build docs
run: npm run docs:build
- name: Unset environment variable for Node v18
if: ${{ matrix.node-version == '18' }}
run: echo "NODE_OPTIONS=''" >> $GITHUB_ENV

all:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 14, 16 ]
node-version: [ 14, 16, 18 ]
name: Build radar and maintainer on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 4fef0bb

Please sign in to comment.