Fix CI setup (#1046)

* Add missing NodeJS versions

* Add GitHub Actions setup

* Use latest graceful-fs version

* Pin graceful-fs to fix readstream bug
This commit is contained in:
Daniel Ruf
2019-11-15 04:02:23 +01:00
committed by typicode
parent 72e5f95c02
commit 47c54d96cf
4 changed files with 38 additions and 12403 deletions

31
.github/workflows/main.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
node: [ '10', '12' ]
name: Node ${{ matrix.node }} (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: install dependencies
run: npm i
- name: run tests
run: npm test
test_latest:
runs-on: ubuntu-latest
container: node:latest
name: Node latest (ubuntu-latest)
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: npm i
- name: run tests
run: npm test

View File

@ -1,4 +1,6 @@
language: node_js
node_js:
- "node"
- "8"
- "12"
- "10"
install: npm i

12402
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@
"test": "test"
},
"scripts": {
"preinstall": "npx npm-force-resolutions",
"test": "npm run build && cross-env NODE_ENV=test jest && npm run lint",
"start": "run-p start:**",
"start:babel-node": "babel-node src/cli/bin db.json -r routes.json",
@ -81,6 +82,9 @@
"webpack-cli": "^3.3.7",
"whatwg-fetch": "^3.0.0"
},
"resolutions": {
"graceful-fs": "4.2.3"
},
"repository": {
"type": "git",
"url": "git://github.com/typicode/json-server.git"