Skip to content

Upstream v3.0.6 to main #143

Upstream v3.0.6 to main

Upstream v3.0.6 to main #143

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and Test
on:
push:
branches: [ "main", "v[0-9].x.x" ]
pull_request:
branches: [ "main", "v[0-9].x.x" ]
permissions:
checks: write
contents: write
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Node.js dependencies
run: npm ci
- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
commit: false
eslint_extensions: js,ts
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Node Dependencies
run: npm ci
- name: Build
run: npm run build:code --if-present
- name: Run tests
run: npm test