From bfa8a99daaef13cf19350b1091e2da49fc1b9c88 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 21 Aug 2019 15:26:45 +0200 Subject: [PATCH] Cleanup travis and coverage script Do not install git, tar and curl as these packages are installed by default on Travis CI. Move the codecov upload to the travis script and do not include the codecov token as it's not needed when uploaded from Travis CI. Make the cover npm script into something that can be runned locally and move the Travis CI version to a new ci-cover script. Remove the verbose flag from the tar extration of the factorio headless server. --- .travis.yml | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b88efc3..a427a119 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ language: node_js node_js: - "9" before_install: - - sudo apt-get -qq update - - sudo apt-get install -y curl git tar - curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 - - tar -xvf factorio.tar.gz + - tar -xf factorio.tar.gz - cp -n config.json.test config.json + - npm install -g codecov script: - - npm run cover \ No newline at end of file + - npm run-script ci-cover + - codecov -f coverage/lcov.info diff --git a/package.json b/package.json index 1ec028b0..2542ad3a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "main": "master.js", "scripts": { "test": "mocha -R spec -- \"./{,!(node_modules)/**/}*.spec.js\" || true", - "cover": "nyc --reporter=lcovonly npm run-script test && codecov -f coverage/lcov.info -t f7b38085-36eb-4d72-84e6-64721910171e", + "cover": "nyc npm run-script test", + "ci-cover": "nyc --reporter=lcovonly npm run-script test", "start": "echo Run node client.js start [instance] to start slaves && node master.js", "install": "node lib/npmPostinstall.js", "bundle-dependencies": "bundle-dependencies" @@ -25,7 +26,6 @@ "body-parser": "^1.18.2", "cli": "^1.0.1", "cli-interact": "^0.1.9", - "codecov": "^3.0.1", "compression": "^1.7.2", "cookie-parser": "^1.4.3", "deepmerge": "^1.5.2",