Skip to content

Commit

Permalink
Add test script and Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and James M. Greene committed Jun 7, 2022
1 parent 5da06fd commit 1be290a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "src/index.js",
"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": {
"type": "git",
Expand Down

0 comments on commit 1be290a

Please sign in to comment.