diff --git a/.travis.yml b/.travis.yml index 0ea8f9933b..8201bbf8b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,7 @@ before_script: - psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database - psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database - silent=1 mongodb-runner --start +script: npm run coverage after_script: - bash <(curl -s https://codecov.io/bash) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..a543f4d2dd --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,24 @@ +# Test against the latest version of this Node.js version +environment: + nodejs_version: "6" + MONGODB_VERSION: "3.4.4" + +services: + - mongodb + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + - npm install -g mongodb-version-manager + - SET DEBUG="*"; m use 3.4.4 + - npm run mongodb-runner + +# Post-install test scripts. +test_script: +- npm run coverage + +# Don't actually build. +build: off diff --git a/package.json b/package.json index 9eac622018..5fd059f602 100644 --- a/package.json +++ b/package.json @@ -72,10 +72,9 @@ "lint": "eslint --cache ./", "build": "babel src/ -d lib/ --copy-files", "pretest": "npm run lint", - "test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 $COVERAGE_OPTION jasmine", - "test:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine", - "coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/nyc' npm test", - "coverage:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 node ./node_modules/.bin/nyc ./node_modules/jasmine/bin/jasmine.js", + "test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 nyc jasmine", + "mongodb-runner": "cross-env DEBUG=* mongodb-runner start", "start": "node ./bin/parse-server", "prepublish": "npm run build" },