Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Travis testing again #210

Merged
merged 17 commits into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "test/web-platform-tests"]
path = test/web-platform-tests
url = https://github.com/alancutter/web-platform-tests.git
branch = nativeShippingAPI
path = test/web-platform-tests
url = https://github.com/web-platform-tests/wpt.git
9 changes: 6 additions & 3 deletions .travis-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ uname -a
cat /etc/lsb-release

npm install
# npm may update the package-lock.json. Revert this to avoid failing grunt-checkrepo.
git checkout HEAD package-lock.json

npm install -g grunt-cli

sudo apt-get update --fix-missing
Expand Down Expand Up @@ -62,19 +65,19 @@ Chrome)
sudo dpkg --install $CHROME || sudo apt-get -f install
which google-chrome
ls -l `which google-chrome`

if [ -f /opt/google/chrome/chrome-sandbox ]; then
export CHROME_SANDBOX=/opt/google/chrome/chrome-sandbox
else
export CHROME_SANDBOX=$(ls /opt/google/chrome*/chrome-sandbox)
fi

# Download a custom chrome-sandbox which works inside OpenVC containers (used on travis).
sudo rm -f $CHROME_SANDBOX
sudo wget https://googledrive.com/host/0B5VlNZ_Rvdw6NTJoZDBSVy1ZdkE -O $CHROME_SANDBOX
sudo chown root:root $CHROME_SANDBOX; sudo chmod 4755 $CHROME_SANDBOX
sudo md5sum $CHROME_SANDBOX

google-chrome --version
;;

Expand Down
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
dist: xenial
services: xvfb
language: node_js

node_js:
- "6.10.2"

install:
- BROWSER="Firefox-stable" ./.travis-setup.sh

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
node_js: "10.15.3"
install: BROWSER="Firefox-stable" ./.travis-setup.sh
script: xvfb-run -a npm test
5 changes: 2 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ module.exports = function(grunt) {
return new Promise(function(resolve) {
var karmaConfig = require('karma/lib/config').parseConfig(require('path').resolve('test/karma-config.js'), {});
configCallback(karmaConfig);
var karmaServer = require('karma').server;
karmaServer.start(karmaConfig, function(exitCode) {
new (require('karma').Server)(karmaConfig, function(exitCode) {
resolve(exitCode == 0);
});
}).start();
});
}

Expand Down
Loading