Skip to content

Commit 41bc043

Browse files
committed
chore(travis): run chrome tests too
1 parent 7649e8c commit 41bc043

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
---
2+
git:
3+
depth: 1
24
language: node_js
35
node_js:
46
- '0.10'
57
before_install:
8+
- export CHROME_BIN=chromium-browser
69
- export DISPLAY=:99.0
710
- sh -e /etc/init.d/xvfb start
11+
- npm update -g
12+
before_script:
813
- npm install -qg bower grunt-cli
9-
- npm install -q
10-
- bower install --force
11-
- bower install --force
14+
- bower install
1215
after_success:
1316
- "./node_modules/angular-ui-publisher/travis/authentication.sh || exit 0"
1417
- "grunt dist build:gh-pages publish:gh-pages build:bower publish:bower"

gruntFile.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ module.exports = function (grunt) {
2929
grunt.registerTask('publish', fakeTargetTask('publish'));
3030
//
3131

32-
var testConfig = function (configFile, customOptions) {
33-
var options = { configFile: configFile, singleRun: true };
34-
var travisOptions = process.env.TRAVIS && { browsers: [ 'Firefox', 'PhantomJS'], reporters: ['dots'] };
35-
return grunt.util._.extend(options, customOptions, travisOptions);
36-
};
37-
3832
// Project configuration.
3933
grunt.initConfig({
4034
bower: 'bower_components',
@@ -70,7 +64,7 @@ module.exports = function (grunt) {
7064
},
7165

7266
karma: {
73-
unit: testConfig('test/karma.conf.js'),
67+
unit: {configFile: 'test/karma.conf.js', singleRun: true},
7468
server: {configFile: 'test/karma.conf.js'},
7569
continuous: {configFile: 'test/karma.conf.js', background: true }
7670
},

test/karma.conf.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = function(config) {
2424

2525
// list of files to exclude
2626
exclude: [
27-
27+
2828
],
2929

3030

@@ -69,4 +69,17 @@ module.exports = function(config) {
6969
// if true, it capture browsers, run tests and exit
7070
singleRun: false
7171
});
72+
73+
74+
if(process.env.TRAVIS){
75+
config.set({
76+
browsers: ['TravisCI_Chrome', 'Firefox', 'PhantomJS'],
77+
customLaunchers: {
78+
TravisCI_Chrome: {
79+
base: 'Chrome',
80+
flags: ['--no-sandbox']
81+
}
82+
},
83+
});
84+
}
7285
};

0 commit comments

Comments
 (0)