mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-11 05:11:40 +00:00
⚙️ 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:
21
.github/workflows/main.yml
vendored
Normal file
21
.github/workflows/main.yml
vendored
Normal 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
|
Reference in New Issue
Block a user