summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-06-27 18:53:38 +0200
committerLukas Eipert <leipert@gitlab.com>2018-06-28 00:37:05 +0200
commit8550f9582b912625f4892223fdbcd3a946dd0bd5 (patch)
treeaffa3b7d1130e36cec172cad0602274cd5f4dccf
parentf63e234b57e07e2020f9698f48c9515905d4b6a3 (diff)
downloadgitlab-ce-leipert-more-coverage-reports.tar.gz
add more coverage resultsleipert-more-coverage-reports
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock4
-rw-r--r--Gemfile.rails5.lock4
-rw-r--r--config/karma.config.js2
-rwxr-xr-xscripts/merge-simplecov7
6 files changed, 19 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8703ef6823a..a1390e0c022 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -812,13 +812,13 @@ coverage:
stage: post-test
script:
- bundle exec scripts/merge-simplecov
+ - ls coverage/
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
artifacts:
name: coverage
expire_in: 31d
paths:
- - coverage/index.html
- - coverage/assets/
+ - coverage/
lint:javascript:report:
<<: *dedicated-no-docs-and-no-qa-pull-cache-job
diff --git a/Gemfile b/Gemfile
index 283886b7187..ad629d02c25 100644
--- a/Gemfile
+++ b/Gemfile
@@ -359,6 +359,7 @@ group :development, :test do
gem 'scss_lint', '~> 0.56.0', require: false
gem 'haml_lint', '~> 0.26.0', require: false
gem 'simplecov', '~> 0.14.0', require: false
+ gem 'simplecov-json', '~> 0.2', require: false
gem 'flay', '~> 2.10.0', require: false
gem 'bundler-audit', '~> 0.5.0', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 13f9212c637..68700f552bd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -865,6 +865,9 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
+ simplecov-json (0.2)
+ json
+ simplecov
slack-notifier (1.5.1)
slop (3.6.0)
spring (2.0.1)
@@ -1170,6 +1173,7 @@ DEPENDENCIES
sidekiq-limit_fetch (~> 3.4)
simple_po_parser (~> 1.1.2)
simplecov (~> 0.14.0)
+ simplecov-json (~> 0.2)
slack-notifier (~> 1.5.1)
spring (~> 2.0.0)
spring-commands-rspec (~> 1.0.4)
diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock
index 3161e4653ee..fe8c7d456fc 100644
--- a/Gemfile.rails5.lock
+++ b/Gemfile.rails5.lock
@@ -874,6 +874,9 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
+ simplecov-json (0.2)
+ json
+ simplecov
slack-notifier (1.5.1)
slop (3.6.0)
spring (2.0.1)
@@ -1181,6 +1184,7 @@ DEPENDENCIES
sidekiq-limit_fetch (~> 3.4)
simple_po_parser (~> 1.1.2)
simplecov (~> 0.14.0)
+ simplecov-json (~> 0.2)
slack-notifier (~> 1.5.1)
spring (~> 2.0.0)
spring-commands-rspec (~> 1.0.4)
diff --git a/config/karma.config.js b/config/karma.config.js
index 84810332dc2..6e53f310b8b 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -112,7 +112,7 @@ module.exports = function(config) {
if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') {
karmaConfig.reporters.push('coverage-istanbul');
karmaConfig.coverageIstanbulReporter = {
- reports: ['html', 'text-summary'],
+ reports: ['html', 'json-summary', 'text-summary'],
dir: 'coverage-javascript/',
subdir: '.',
fixWebpackSourcePaths: true,
diff --git a/scripts/merge-simplecov b/scripts/merge-simplecov
index 65f93f8830b..046456e2844 100755
--- a/scripts/merge-simplecov
+++ b/scripts/merge-simplecov
@@ -3,6 +3,13 @@
require_relative '../spec/simplecov_env'
SimpleCovEnv.configure_profile
+require 'simplecov-json'
+
+SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
+ SimpleCov::Formatter::HTMLFormatter,
+ SimpleCov::Formatter::JSONFormatter
+])
+
module SimpleCov
module ResultMerger
class << self