Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
6638fc16
Commit
6638fc16
authored
10 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
Gruntfile: skip steps when $TWBS_DO_*=0
parent
db26c9f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Gruntfile.js
+9
-2
Gruntfile.js
with
9 additions
and
2 deletions
+9
-2
Gruntfile.js
+
9
-
2
View file @
6638fc16
...
...
@@ -404,6 +404,9 @@ module.exports = function (grunt) {
var
runSubset
=
function
(
subset
)
{
return
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
subset
;
};
var
isUndefOrNonZero
=
function
(
val
)
{
return
val
===
undefined
||
val
!==
'
0
'
;
};
// Test task.
var
testSubtasks
=
[];
...
...
@@ -412,13 +415,17 @@ module.exports = function (grunt) {
testSubtasks
=
testSubtasks
.
concat
([
'
dist-css
'
,
'
csslint
'
,
'
jshint
'
,
'
jscs
'
,
'
qunit
'
,
'
build-customizer-html
'
]);
}
// Skip HTML validation if running a different subset of the test suite
if
(
runSubset
(
'
validate-html
'
))
{
if
(
runSubset
(
'
validate-html
'
)
&&
// Skip HTML5 validator on Travis when [skip validator] is in the commit message
isUndefOrNonZero
(
process
.
env
.
TWBS_DO_VALIDATOR
))
{
testSubtasks
.
push
(
'
validate-html
'
);
}
// Only run Sauce Labs tests if there's a Sauce access key
if
(
typeof
process
.
env
.
SAUCE_ACCESS_KEY
!==
'
undefined
'
&&
// Skip Sauce if running a different subset of the test suite
runSubset
(
'
sauce-js-unit
'
))
{
runSubset
(
'
sauce-js-unit
'
)
&&
// Skip Sauce on Travis when [skip sauce] is in the commit message
isUndefOrNonZero
(
process
.
env
.
TWBS_DO_SAUCE
))
{
testSubtasks
.
push
(
'
connect
'
);
testSubtasks
.
push
(
'
saucelabs-qunit
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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