From 1be26ad362a95074a85fdea3b1def47eff12d91d Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 18 Sep 2018 10:47:01 +0200 Subject: [PATCH 1/3] disable codecov --- scripts/circle-test-backend.sh | 12 +----------- scripts/circle-test-frontend.sh | 7 +------ 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/scripts/circle-test-backend.sh b/scripts/circle-test-backend.sh index 4740ef99f1a..959a5812d81 100755 --- a/scripts/circle-test-backend.sh +++ b/scripts/circle-test-backend.sh @@ -17,17 +17,7 @@ echo "building backend with install to cache pkgs" exit_if_fail time go install ./pkg/cmd/grafana-server echo "running go test" - set -e -echo "" > coverage.txt - time for d in $(go list ./pkg/...); do - exit_if_fail go test -coverprofile=profile.out -covermode=atomic $d - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi + exit_if_fail go test -covermode=atomic $d done - -echo "Publishing go code coverage" -bash <(curl -s https://codecov.io/bash) -cF go diff --git a/scripts/circle-test-frontend.sh b/scripts/circle-test-frontend.sh index 796af82e7d8..3af199d3ff2 100755 --- a/scripts/circle-test-frontend.sh +++ b/scripts/circle-test-frontend.sh @@ -10,9 +10,4 @@ function exit_if_fail { fi } -exit_if_fail npm run test:coverage - -# publish code coverage -echo "Publishing javascript code coverage" -bash <(curl -s https://codecov.io/bash) -cF javascript -rm -rf coverage +exit_if_fail npm run test From 63ed02e626939eb4ff342d324c1863f1ad314fb3 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 18 Sep 2018 11:44:31 +0200 Subject: [PATCH 2/3] removes codedov refs --- Gruntfile.js | 1 - codecov.yml | 11 ----------- package.json | 1 - scripts/grunt/options/exec.js | 7 +------ 4 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 codecov.yml diff --git a/Gruntfile.js b/Gruntfile.js index 8a71fb44148..2d5990b5f58 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,6 @@ module.exports = function (grunt) { } } - config.coverage = grunt.option('coverage'); config.phjs = grunt.option('phjsToRelease'); config.pkg.version = grunt.option('pkgVer') || config.pkg.version; diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index b2a839365ac..00000000000 --- a/codecov.yml +++ /dev/null @@ -1,11 +0,0 @@ -coverage: - precision: 2 - round: down - range: "50...100" - - status: - project: yes - patch: yes - changes: no - -comment: off diff --git a/package.json b/package.json index f4846f9fc51..1e7ed02c87b 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "watch": "webpack --progress --colors --watch --mode development --config scripts/webpack/webpack.dev.js", "build": "grunt build", "test": "grunt test", - "test:coverage": "grunt test --coverage=true", "lint": "tslint -c tslint.json --project tsconfig.json", "jest": "jest --notify --watch", "api-tests": "jest --notify --watch --config=tests/api/jest.js", diff --git a/scripts/grunt/options/exec.js b/scripts/grunt/options/exec.js index 087439f7ea9..2634f2b546b 100644 --- a/scripts/grunt/options/exec.js +++ b/scripts/grunt/options/exec.js @@ -1,14 +1,9 @@ module.exports = function(config, grunt) { 'use strict'; - var coverage = ''; - if (config.coverage) { - coverage = '--coverage --maxWorkers 2'; - } - return { tslint: 'node ./node_modules/tslint/lib/tslintCli.js -c tslint.json --project ./tsconfig.json', - jest: 'node ./node_modules/jest-cli/bin/jest.js ' + coverage, + jest: 'node ./node_modules/jest-cli/bin/jest.js', webpack: 'node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js', }; }; From 0f8b9b8ff9e01d7c4cbe705101ee87d21082d4bd Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 18 Sep 2018 12:07:53 +0200 Subject: [PATCH 3/3] set maxworkers 2 for frontend tests --- scripts/circle-test-frontend.sh | 1 + scripts/grunt/options/exec.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/circle-test-frontend.sh b/scripts/circle-test-frontend.sh index 3af199d3ff2..68c044b395c 100755 --- a/scripts/circle-test-frontend.sh +++ b/scripts/circle-test-frontend.sh @@ -11,3 +11,4 @@ function exit_if_fail { } exit_if_fail npm run test +exit_if_fail npm run build diff --git a/scripts/grunt/options/exec.js b/scripts/grunt/options/exec.js index 2634f2b546b..92e530cd5fd 100644 --- a/scripts/grunt/options/exec.js +++ b/scripts/grunt/options/exec.js @@ -3,7 +3,7 @@ module.exports = function(config, grunt) { return { tslint: 'node ./node_modules/tslint/lib/tslintCli.js -c tslint.json --project ./tsconfig.json', - jest: 'node ./node_modules/jest-cli/bin/jest.js', + jest: 'node ./node_modules/jest-cli/bin/jest.js --maxWorkers 2', webpack: 'node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js', }; };