Merge branch 'master' into develop

This commit is contained in:
Torkel Ödegaard
2017-10-22 11:51:14 +02:00
85 changed files with 4206 additions and 3294 deletions

View File

@ -16,8 +16,16 @@ rm -rf node_modules
npm install -g yarn --quiet
yarn install --pure-lockfile --no-progress
exit_if_fail npm test
exit_if_fail npm build
exit_if_fail npm run test-ci
exit_if_fail npm run build
# publish code coverage
echo "Publishing javascript code coverage"
bash <(curl -s https://codecov.io/bash) -cF javascript
rm -rf coverage
# npm install -g codecov
# codecov
# cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js
echo "running go fmt"
exit_if_fail test -z "$(gofmt -s -l ./pkg | tee /dev/stderr)"
@ -29,4 +37,17 @@ echo "building binaries"
exit_if_fail go run build.go build
echo "running go test"
exit_if_fail go test -v ./pkg/...
set -e
echo "" > coverage.txt
for d in $(go list ./pkg/...); do
exit_if_fail go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
echo "Publishing go code coverage"
bash <(curl -s https://codecov.io/bash) -cF go

View File

@ -14,6 +14,7 @@ module.exports = function(grunt) {
'jshint',
'sasslint',
'exec:tslint',
"exec:jest",
'karma:test',
'no-only-tests'
]);

View File

@ -1,6 +1,13 @@
module.exports = function(config, grunt) {
'use strict'
var coverage = '';
if (config.coverage) {
coverage = '--coverage';
}
return {
tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json --type-check",
tslint : "node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json",
jest : "node ./node_modules/jest-cli/bin/jest.js " + coverage,
};
};

View File

@ -26,6 +26,10 @@ module.exports = merge(common, {
]
},
devServer: {
stats: 'errors-only',
},
plugins: [
new ExtractTextPlugin({
filename: 'grafana.[name].css',