Skip to content

Dev

Dev #149

name: Build and test
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node-version }}-
${{ runner.os }}-npm-
- name: npm install, build, and test
run: |
npm ci
npm i eslint ts-node typescript
npm run lint
npm run pack
npm run build
npm run testb
# npm run test:types
env:
CI: true