Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
149f67cc
Commit
149f67cc
authored
Feb 04, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove coverage entry from global CI/CD options
parent
8a333d45
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
27 deletions
+15
-27
lib/gitlab/ci/config/entry/global.rb
lib/gitlab/ci/config/entry/global.rb
+1
-4
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+8
-17
spec/lib/gitlab/ci/config/entry/global_spec.rb
spec/lib/gitlab/ci/config/entry/global_spec.rb
+6
-6
No files found.
lib/gitlab/ci/config/entry/global.rb
View file @
149f67cc
...
...
@@ -33,11 +33,8 @@ module Gitlab
entry
:cache
,
Entry
::
Cache
,
description:
'Configure caching between build jobs.'
entry
:coverage
,
Entry
::
Coverage
,
description:
'Coverage configuration for this pipeline.'
helpers
:before_script
,
:image
,
:services
,
:after_script
,
:variables
,
:stages
,
:types
,
:cache
,
:
coverage
,
:
jobs
:variables
,
:stages
,
:types
,
:cache
,
:jobs
def
compose!
(
_deps
=
nil
)
super
(
self
)
do
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
149f67cc
...
...
@@ -5,27 +5,18 @@ module Ci
let
(
:path
)
{
'path'
}
describe
'#build_attributes'
do
context
'C
overage entry'
do
describe
'c
overage entry'
do
subject
{
described_class
.
new
(
config
,
path
).
build_attributes
(
:rspec
)
}
let
(
:config_base
)
{
{
rspec:
{
script:
"rspec"
}
}
}
let
(
:config
)
{
YAML
.
dump
(
config_base
)
}
context
'when config has coverage set at the global scope'
do
before
do
config_base
.
update
(
coverage:
'/\(\d+\.\d+\) covered/'
)
end
context
"and 'rspec' job doesn't have coverage set"
do
it
{
is_expected
.
to
include
(
coverage_regex:
'\(\d+\.\d+\) covered'
)
}
end
context
"but 'rspec' job also has coverage set"
do
before
do
config_base
[
:rspec
][
:coverage
]
=
'/Code coverage: \d+\.\d+/'
describe
'code coverage regexp'
do
let
(
:config
)
do
YAML
.
dump
(
rspec:
{
script:
'rspec'
,
coverage:
'/Code coverage: \d+\.\d+/'
})
end
it
{
is_expected
.
to
include
(
coverage_regex:
'Code coverage: \d+\.\d+'
)
}
it
'includes coverage regexp in build attributes'
do
expect
(
subject
)
.
to
include
(
coverage_regex:
'Code coverage: \d+\.\d+'
)
end
end
end
...
...
spec/lib/gitlab/ci/config/entry/global_spec.rb
View file @
149f67cc
...
...
@@ -10,10 +10,10 @@ describe Gitlab::Ci::Config::Entry::Global do
context
'when filtering all the entry/node names'
do
it
'contains the expected node names'
do
node_names
=
described_class
.
nodes
.
keys
expect
(
node_names
)
.
to
match_array
(
%i[before_script image services
expect
(
described_class
.
nodes
.
keys
)
.
to
match_array
(
%i[before_script image services
after_script variables stages
types cache coverag
e]
)
types cach
e]
)
end
end
end
...
...
@@ -40,7 +40,7 @@ describe Gitlab::Ci::Config::Entry::Global do
end
it
'creates node object for each entry'
do
expect
(
global
.
descendants
.
count
).
to
eq
9
expect
(
global
.
descendants
.
count
).
to
eq
8
end
it
'creates node object using valid class'
do
...
...
@@ -181,7 +181,7 @@ describe Gitlab::Ci::Config::Entry::Global do
describe
'#nodes'
do
it
'instantizes all nodes'
do
expect
(
global
.
descendants
.
count
).
to
eq
9
expect
(
global
.
descendants
.
count
).
to
eq
8
end
it
'contains unspecified nodes'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment