Skip to content

test: add initial tests and workflows #10

test: add initial tests and workflows

test: add initial tests and workflows #10

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test_18:
name: Test node.js 18
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install node.js v18
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm install
- name: Run tsc
run: npm run prestart
- name: Run eslint
run: npm run lint
- name: Run tests
run: npm run test
test_20:
name: Test node.js 20
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install node.js v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Run tsc
run: npm run prestart
- name: Run eslint
run: npm run lint
- name: Run tests
run: npm run test
test_coverage:
name: Test coverage
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install node.js v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Run tsc
run: npm run prestart
- name: Run tests
run: npm run test:coverage