⚙️ Add linting and CI infrastructure (#85)

* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook
This commit is contained in:
Tatiana Mac
2020-03-05 10:17:19 -08:00
committed by GitHub
parent 1d3fdfc6e9
commit ca07ab31f6
3 changed files with 808 additions and 0 deletions

21
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Node CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: npm install, lint, and test
run: |
npm install
npm run lint
npm test
env:
CI: true