Skip to content

Commit

Permalink
Merge 33c1b0e into 12ff539
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Apr 23, 2018
2 parents 12ff539 + 33c1b0e commit 5feac10
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 33 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
sudo: false
dist: trusty
addons:
chrome: stable
language: node_js
node_js:
- 'node'
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm prune
- npm install
- npm update
script:
- npm run lint
- npm run build
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ input](#microphone-plugin).
[![npm](https://img.shields.io/npm/dm/videojs-wavesurfer.svg)](https://github.com/collab-project/videojs-wavesurfer/releases)
[![License](https://img.shields.io/npm/l/videojs-wavesurfer.svg)](LICENSE)
[![Build Status](https://travis-ci.org/collab-project/videojs-wavesurfer.svg?branch=master)](https://travis-ci.org/collab-project/videojs-wavesurfer)
[![Coverage Status](https://coveralls.io/repos/github/collab-project/videojs-wavesurfer/badge.svg?branch=master)](https://coveralls.io/github/collab-project/videojs-wavesurfer?branch=master)

Installation
------------
Expand Down
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ environment:
matrix:
- nodejs_version: '8'
install:
- choco install -y googlechrome --ignore-checksums
- ps: Install-Product node $env:nodejs_version
- set CI=true
- npm install --global npm@latest
- set PATH=%APPDATA%\npm;%PATH%
- npm install
matrix:
fast_finish: true
# Disable automatic builds
build: off
# Do not build on gh tags
skip_tags: true
shallow_clone: true
test_script:
- node --version
Expand All @@ -18,3 +22,4 @@ test_script:
- npm run build
cache:
- '%APPDATA%\npm-cache'
- node_modules -> package.json
28 changes: 21 additions & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ require('babel-register');

var webpackConfig = require('./build-config/webpack.prod.main.js');

var chromeFlags = [
'--no-sandbox',
'--use-fake-ui-for-media-stream'
];

module.exports = function(config) {
var configuration = {
basePath: '',
frameworks: ['jasmine', 'jasmine-matchers'],
hostname: 'localhost',
port: 9876,
logLevel: config.LOG_INFO,
singleRun: true,
singleRun: true, // enable for headless testing
autoWatch: false,
files: [
// demo files
Expand All @@ -27,11 +32,11 @@ module.exports = function(config) {
},

// style
'node_modules/video.js/dist/video-js.css',
'dist/css/videojs.wavesurfer.css',

// dependencies
'node_modules/video.js/dist/video.js',
'node_modules/video.js/dist/video-js.css',
'node_modules/wavesurfer.js/dist/wavesurfer.js',
'node_modules/wavesurfer.js/dist/plugin/wavesurfer.microphone.js',

Expand All @@ -54,9 +59,10 @@ module.exports = function(config) {
'karma-jasmine-matchers',
'karma-chrome-launcher',
'karma-coverage',
'karma-coveralls',
'karma-verbose-reporter'
],
browsers: ['ChromeHeadless'],
browsers: ['Chrome_dev'],
captureConsole: true,
colors: true,
reporters: ['verbose', 'progress', 'coverage'],
Expand All @@ -66,17 +72,25 @@ module.exports = function(config) {
},
webpack: webpackConfig,
customLaunchers: {
Chrome_travis_ci: {
Chrome_dev: {
base: 'Chrome',
flags: [
'--no-sandbox'
]
flags: chromeFlags
},
Chrome_travis_ci: {
base: 'ChromeHeadless',
flags: chromeFlags
}
}
};

if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
configuration.singleRun = true;

// enable coveralls
configuration.reporters.push('coveralls');
// lcov or lcovonly are required for generating lcov.info files
configuration.coverageReporter.type = 'lcov';
}

config.set(configuration);
Expand Down
111 changes: 97 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@
"prepublish": "not-in-install && npm run build || in-install"
},
"files": [
".babelrc",
".jscsrc",
"dist/",
"src/",
"test/",
"build-config/"
"src/"
],
"keywords": [
"waveform",
Expand Down Expand Up @@ -77,6 +73,7 @@
"karma": "^2.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-coveralls": "^1.1.2",
"karma-jasmine": "^1.1.1",
"karma-jasmine-matchers": "^3.7.0",
"karma-verbose-reporter": "0.0.6",
Expand All @@ -87,6 +84,6 @@
"webpack": "3",
"webpack-dev-server": "^2.11.1",
"webpack-merge": "^4.1.2",
"webrtc-adapter": "^6.1.4"
"webrtc-adapter": "^6.1.5"
}
}
2 changes: 1 addition & 1 deletion test/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const TestHelpers = {
wavesurfer: {
src: this.EXAMPLE_AUDIO_FILE,
msDisplayMax: 10,
debug: false,
debug: true,
waveColor: 'blue',
progressColor: 'black',
cursorColor: 'black',
Expand Down

0 comments on commit 5feac10

Please sign in to comment.