Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 989adee

Browse files
committed
Merge pull request #82 from angular-ui/chore-travis-allow-chrome-testing
chore(travis): allow chrome testing
2 parents 0c3ed43 + e03109c commit 989adee

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2+
git:
3+
depth: 1
24
language: node_js
35
node_js:
46
- '0.10'
5-
git:
6-
depth: 10
77
before_install:
8+
- export CHROME_BIN=chromium-browser
89
- export DISPLAY=:99.0
910
- sh -e /etc/init.d/xvfb start
11+
- npm update -g
12+
before_script:
1013
- npm install -qg bower grunt-cli
11-
- npm install -q
12-
- bower install --force
13-
- bower install --force
14+
- bower install
1415
after_success:
1516
- "./node_modules/angular-ui-publisher/travis/authentication.sh || exit 0"
1617
- "grunt dist build:gh-pages publish:gh-pages build:bower publish:bower"
17-
script: grunt
1818
env:
1919
global:
2020
- REPO="[email protected]:angular-ui/ui-ace.git"

gruntFile.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ module.exports = function (grunt) {
2727

2828
grunt.registerTask('build', fakeTargetTask('build'));
2929
grunt.registerTask('publish', fakeTargetTask('publish'));
30-
//
31-
32-
33-
var testConfig = function (configFile, customOptions) {
34-
var options = { configFile: configFile, singleRun: true };
35-
var travisOptions = process.env.TRAVIS && { browsers: [ 'Firefox', 'PhantomJS'], reporters: ['dots'] };
36-
return grunt.util._.extend(options, customOptions, travisOptions);
37-
};
3830

3931
// Project configuration.
4032
grunt.initConfig({
@@ -69,7 +61,7 @@ module.exports = function (grunt) {
6961
},
7062

7163
karma: {
72-
unit: testConfig('test/karma.conf.js'),
64+
unit: {configFile: 'test/karma.conf.js', singleRun: true},
7365
coverage : {
7466
configFile: 'test/karma.conf.js',
7567
reporters: ['progress', 'coverage'],

test/karma.conf.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)