Skip to content

chore: update node to v20 and npm to v9 or newer #4773

chore: update node to v20 and npm to v9 or newer

chore: update node to v20 and npm to v9 or newer #4773

name: Continuous Integration
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Build
run: |
# Workaround https://github.com/zeit/ncc/issues/457.
mv tsconfig.production.json tsconfig.json
npm run build
timeout-minutes: 5
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Format
run: npm run format
timeout-minutes: 5
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Lint
run: npm run lint
timeout-minutes: 5
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Spellcheck
run: npm run spellcheck
timeout-minutes: 5
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
- name: Install latest npm
run: npm install --global npm@latest
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Test
run: npm run test:ci
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 5
types:
name: Types
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: 'npm'
node-version: 20
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Types
run: npm run types
timeout-minutes: 5