Add test script and Actions workflow

This commit is contained in:
James M. Greene
2022-06-07 14:25:56 -05:00
parent 5da06fdf1c
commit 1be290acd6
2 changed files with 27 additions and 1 deletions

25
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Run Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node.JS
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test

View File

@@ -4,7 +4,8 @@
"description": "", "description": "",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"prepare": "ncc build src/index.js -o dist --source-map --license licenses.txt" "prepare": "ncc build src/index.js -o dist --source-map --license licenses.txt",
"test": "jest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",