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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fe57708e
Commit
fe57708e
authored
Apr 28, 2017
by
Rémy Coutable
Committed by
Robert Speicher
Apr 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "rspec_profiling is enabled for MySQL"
parent
2952a447
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
config/initializers/rspec_profiling.rb
config/initializers/rspec_profiling.rb
+4
-4
scripts/prepare_build.sh
scripts/prepare_build.sh
+1
-3
spec/spec_helper.rb
spec/spec_helper.rb
+3
-2
No files found.
.gitlab-ci.yml
View file @
fe57708e
...
...
@@ -19,8 +19,8 @@ variables:
before_script
:
-
bundle --version
-
.
scripts/utils.sh
-
./
scripts/prepare_build.sh
-
source
scripts/utils.sh
-
source
scripts/prepare_build.sh
stages
:
-
prepare
...
...
config/initializers/rspec_profiling.rb
View file @
fe57708e
...
...
@@ -36,10 +36,10 @@ if Rails.env.test?
RspecProfiling
::
Collectors
::
PSQL
.
prepend
(
RspecProfilingExt
::
PSQL
)
config
.
collector
=
RspecProfiling
::
Collectors
::
PSQL
end
end
if
ENV
.
has_key?
(
'CI'
)
&&
ENV
[
'GITLAB_DATABASE'
]
==
'postgresql'
if
ENV
.
key?
(
'CI'
)
RspecProfiling
::
VCS
::
Git
.
prepend
(
RspecProfilingExt
::
Git
)
RspecProfiling
::
Run
.
prepend
(
RspecProfilingExt
::
Run
)
end
end
end
scripts/prepare_build.sh
100755 → 100644
View file @
fe57708e
#!/bin/sh
.
scripts/utils.sh
export
SETUP_DB
=
${
SETUP_DB
:-
true
}
...
...
@@ -32,7 +30,7 @@ sed -i 's/localhost/redis/g' config/resque.yml
cp
config/gitlab.yml.example config/gitlab.yml
if
[
"
$USE_BUNDLE_INSTALL
"
!=
"false"
]
;
then
retry
bundle
install
--clean
$BUNDLE_INSTALL_FLAGS
&&
bundle check
bundle
install
--clean
$BUNDLE_INSTALL_FLAGS
&&
bundle check
fi
# Only install knapsack after bundle install! Otherwise oddly some native
...
...
spec/spec_helper.rb
View file @
fe57708e
...
...
@@ -13,8 +13,9 @@ rspec_profiling_is_configured =
ENV
[
'RSPEC_PROFILING_POSTGRES_URL'
]
||
ENV
[
'RSPEC_PROFILING'
]
branch_can_be_profiled
=
ENV
[
'CI_COMMIT_REF_NAME'
]
==
'master'
||
ENV
[
'CI_COMMIT_REF_NAME'
]
=~
/rspec-profile/
ENV
[
'GITLAB_DATABASE'
]
==
'postgresql'
&&
(
ENV
[
'CI_COMMIT_REF_NAME'
]
==
'master'
||
ENV
[
'CI_COMMIT_REF_NAME'
]
=~
/rspec-profile/
)
if
rspec_profiling_is_configured
&&
(
!
ENV
.
key?
(
'CI'
)
||
branch_can_be_profiled
)
require
'rspec_profiling/rspec'
...
...
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