Run tests on GitHub Actions

For some reason the CircleCI results aren't public - clicking the link from GitHub requires a login. I thought it might be easier to try running the tests on GitHub Actions.
This commit is contained in:
Adam Johnson 2021-02-07 12:09:12 +00:00
parent ec57534150
commit bd0e669414
2 changed files with 32 additions and 19 deletions

View File

@ -1,19 +0,0 @@
version: 2.1
orbs:
node: circleci/node@1.1.6
jobs:
build-and-test:
docker:
- image: 'circleci/node:latest-browsers'
executor:
name: node/default
steps:
- checkout
- node/with-cache:
steps:
- run: npm install
- run: npm test
workflows:
build-and-test:
jobs:
- build-and-test

32
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: CI
on:
push:
branches:
- dev
- master
pull_request:
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "15"
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install JavaScript dependencies
run: npm install --include=dev
- name: JavaScript build
run: npm test