Skip to content

Commit

Permalink
chore(workflows): configure tests workflow
Browse files Browse the repository at this point in the history
This adds a workflow to run test cases against pull requests
to the main and support branches.
  • Loading branch information
Jonathan Golden committed Nov 11, 2020
1 parent 665aa40 commit a86846c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,30 @@
name: Tests
on:
pull_request:
branches:
- main
- support/**
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '10.x', '12.x' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- run: |
git remote set-branches --add origin main
git fetch
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
env:
NODE_ENV: development
- name: Unit Tests
run: npm run test
env:
NODE_ENV: production
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"main": "build/index.js",
"scripts": {
"lint": "eslint ./ --ignore-path .gitignore --ext .js",
"test": "jest --ci=false",
"test": "jest",
"test:lockfile": "lockfile-lint -p package-lock.json -t npm -a npm -o https: -c -i",
"test:git-history": "commitlint --from origin/main --to HEAD",
"build": "babel src --out-dir build",
Expand Down

0 comments on commit a86846c

Please sign in to comment.