Skip to content

Add tests + prettier and configure CI #2

Add tests + prettier and configure CI

Add tests + prettier and configure CI #2

Workflow file for this run

name: Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Prettier
run: npm run prettier:check
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
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 dependencies
run: npm ci
- name: Run tests
run: npm test