Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintignore1
-rw-r--r--.gitignore1
-rw-r--r--.gitlab/ci/test.gitlab-ci.yml6
-rw-r--r--.prettierignore1
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock12
-rw-r--r--spec/spec_helper.rb7
7 files changed, 30 insertions, 0 deletions
diff --git a/.eslintignore b/.eslintignore
index 31662bc1..157478c6 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,4 @@
+/coverage/
/node_modules/
/public/
/vendor/
diff --git a/.gitignore b/.gitignore
index f2ea83de..df16e7c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@ tmp/
.yarn-cache/
vendor/
node_modules/
+coverage/
diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml
index b1c30972..1289131a 100644
--- a/.gitlab/ci/test.gitlab-ci.yml
+++ b/.gitlab/ci/test.gitlab-ci.yml
@@ -56,6 +56,12 @@ rspec:
stage: test
script:
- make rspec-tests
+ coverage: '/\(\d+.\d+\%\) covered/'
+ artifacts:
+ reports:
+ coverage_report:
+ coverage_format: cobertura
+ path: coverage/coverage.xml
#
# Run JavaScript tests
diff --git a/.prettierignore b/.prettierignore
index c62e1388..eccbb6b6 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,3 +1,4 @@
+/coverage/
/node_modules/
/public/
/vendor/
diff --git a/Gemfile b/Gemfile
index acfb2ac7..433adf31 100644
--- a/Gemfile
+++ b/Gemfile
@@ -23,6 +23,8 @@ group :test, :development do
gem 'highline', '~> 2.0.3'
gem 'rspec', '~> 3.11.0'
gem 'rspec-parameterized', '~> 0.5.2'
+ gem 'simplecov', '~> 0.21.2', require: false
+ gem 'simplecov-cobertura', '~> 2.1', require: false
gem 'pry-byebug', '~> 3.10.1', require: false
gem 'gitlab-styles', '~> 9.0.0', require: false
end
diff --git a/Gemfile.lock b/Gemfile.lock
index ba0b7891..3d32acd0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -54,6 +54,7 @@ GEM
ddmetrics (1.0.1)
ddplugin (1.0.3)
diff-lcs (1.5.0)
+ docile (1.4.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
@@ -267,6 +268,15 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
+ simplecov (0.21.2)
+ docile (~> 1.1)
+ simplecov-html (~> 0.11)
+ simplecov_json_formatter (~> 0.1)
+ simplecov-cobertura (2.1.0)
+ rexml
+ simplecov (~> 0.19)
+ simplecov-html (0.12.3)
+ simplecov_json_formatter (0.1.4)
slow_enumerator_tools (1.1.0)
stringio (3.0.2)
terminal-table (3.0.2)
@@ -301,6 +311,8 @@ DEPENDENCIES
rspec-parameterized (~> 0.5.2)
sass (= 3.7.4)
sassc (~> 2.4.0)
+ simplecov (~> 0.21.2)
+ simplecov-cobertura (~> 2.1)
BUNDLED WITH
2.3.22
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 762c465b..29762f59 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,5 +1,12 @@
# frozen_string_literal: true
+require 'simplecov'
+require 'simplecov-cobertura'
+
+unless ENV['SIMPLECOV'] == '0'
+ SimpleCov.start
+ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
+end
$LOAD_PATH << 'lib/'
require 'rspec-parameterized'