mirror of
https://github.com/typicode/json-server.git
synced 2025-07-31 06:01:50 +08:00
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:
31
.github/workflows/main.yaml
vendored
Normal file
31
.github/workflows/main.yaml
vendored
Normal 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
|
@ -1,4 +1,6 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
- "8"
|
||||
- "12"
|
||||
- "10"
|
||||
install: npm i
|
12402
package-lock.json
generated
12402
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
|
Reference in New Issue
Block a user