Skip to content

Commit

Permalink
chore: fix travis build (#5627)
Browse files Browse the repository at this point in the history
Disable running tests in Firefox on Travis for regular PRs as it wasn't the case previously and is broken for some reason. We'll follow up in the future in #5626.

Update .travis.yml based on their latest infrastructure and new npm caching method.

Silence logging of sourceset test sources.

Closes #5616
  • Loading branch information
brandonocasey authored and gkatsev committed Nov 28, 2018
1 parent 3e52c4f commit 6c1056b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
32 changes: 13 additions & 19 deletions .travis.yml
@@ -1,18 +1,25 @@
dist: xenial
language: node_js
node_js:
- lts/*
cache: npm
before_install:
- npm install -g greenkeeper-lockfile@1
- export CHROME_BIN=/usr/bin/google-chrome
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script: greenkeeper-lockfile-update
- greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload

after_failure:
- npm ls --depth=1
after_success:
- npm run assets
addons:
chrome: stable

env:
global:
- secure: K6JpKwMkfNaJix3Bb0tLjVMzHMJgtBXdd/dvfw1BMb9DCBpd81PqXbDs7yXCddUxnUPTBPxZCrQgWsw71Wn+qEoIG5MU3uOT5A2rBbx/yZonVAGv5ed/9w0xk0OzO383CmPMFqwqtp9YmdmqGjQBkYXVXJjTvNTOAExFSdhO+3U=
- secure: GIbhjUJapvC70nIZVlhVyK+3KAD2TVKpiY/q412OO7V2izbvcM1tvU3LBoMZbROzrt5TT84tCoJDvHnrpL0OvxPwrzL5CUU7h4UTxhTOyQkEinbYAnWlW9wdrvtdczsEvANkFPqBZ53B3hVHZHMLOG8QRWaTBicF68vSHEJFqb4=

notifications:
irc:
channels:
Expand All @@ -23,17 +30,4 @@ notifications:
- http://pam.videojs.com/savage/travis
slack:
secure: LrF8K6mCYWlUt6SvdbGHazyQZSk/opKoiB/wgoGYaGc9+3wYXkVexY0WkO1m6wBKhUqXRAMVMFszr1wqKgdcxtItmFMMj8HqTLI1MVqgKqYX4Ux3CnEHJQiwxIk0aVL7lHLsZTXV/2Y0QIOYmAnCrgy46klETrk0ZuXf5okpu2Q=
env:
global:
- secure: K6JpKwMkfNaJix3Bb0tLjVMzHMJgtBXdd/dvfw1BMb9DCBpd81PqXbDs7yXCddUxnUPTBPxZCrQgWsw71Wn+qEoIG5MU3uOT5A2rBbx/yZonVAGv5ed/9w0xk0OzO383CmPMFqwqtp9YmdmqGjQBkYXVXJjTvNTOAExFSdhO+3U=
- secure: GIbhjUJapvC70nIZVlhVyK+3KAD2TVKpiY/q412OO7V2izbvcM1tvU3LBoMZbROzrt5TT84tCoJDvHnrpL0OvxPwrzL5CUU7h4UTxhTOyQkEinbYAnWlW9wdrvtdczsEvANkFPqBZ53B3hVHZHMLOG8QRWaTBicF68vSHEJFqb4=
sudo: false
dist: trusty
cache:
directories:
- node_modules
addons:
firefox: latest
apt:
packages:
- google-chrome-stable

13 changes: 13 additions & 0 deletions test/karma.conf.js
Expand Up @@ -7,6 +7,10 @@ module.exports = function(config) {
// see https://github.com/videojs/videojs-generate-karma-config
// for options
const options = {
travisLaunchers(defaults) {
delete defaults.travisFirefox;
return defaults;
},
serverBrowsers(defaults) {
return [];
},
Expand All @@ -15,6 +19,15 @@ module.exports = function(config) {

config = generate(config, options);

config.proxies = config.proxies || {};

// disable warning logs for sourceset tests, by proxing to a remote host
Object.assign(config.proxies, {
'/test/relative-one.mp4': 'http://example.com/relative-one.mp4',
'/test/relative-two.mp4': 'http://example.com/relative-two.mp4',
'/test/relative-three.mp4': 'http://example.com/relative-three.mp4'
});

config.files = [
'dist/video-js.css',
'test/globals-shim.js',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/sourceset.test.js
Expand Up @@ -14,7 +14,7 @@ const blobSrc = {
type: 'video/mp4'
};
const testSrc = {
src: 'http://vjs.zencdn.net/v/oceans.mp4',
src: 'http://example.com/testSrc.mp4',
type: 'video/mp4'
};
const sourceOne = {src: 'http://example.com/one.mp4', type: 'video/mp4'};
Expand Down

0 comments on commit 6c1056b

Please sign in to comment.