Skip to content

add test to CI/CD

add test to CI/CD #3

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 21.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: Install dependencies
run: yarn install
- name: Compile TypeScript
run: yarn tsc
- name: Run linter
run: yarn lint
- name: Run prettier check
run: yarn pretty --check
- name: Run tests with coverage
run: yarn cover
- name: Run all tests
run: yarn test