Skip to content

upgrade node to v20 #26

upgrade node to v20

upgrade node to v20 #26

Workflow file for this run

name: Quality check
on:
push:
branches:
- main
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: NodeJS
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 19.x
- run: node -p process.versions
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
unit-tests:
name: Unit tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18.x, 19.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: NodeJS ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}
- run: node -p process.versions
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm test
coverage:
name: Report coverage
env:
CC_TEST_REPORTER_ID: a2d82974a4532d427b8855175de07eabef6bba36a8025d3c346a3ead1be33141
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: NodeJS
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 19.x
- run: node -p process.versions
- name: Install dependencies
run: npm ci
- name: Set up CodeClimate reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Run unit tests and report
run: |
./cc-test-reporter before-build
npm test -- --coverage
EXIT_CODE=$?
mv ./packages/coverage/clover.xml ./clover.xml
./cc-test-reporter after-build -t clover --exit-code $EXIT_CODE
audit:
name: Audit dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: NodeJS
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 19.x
- run: node -p process.versions
- name: Install dependencies
run: npm ci
- name: Audit dependencies
run: npm audit