Skip to content

Commit

Permalink
Run P3 tests in all browsers. Bump node to 8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed May 2, 2018
1 parent 2bd3863 commit bd0dffb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: true
dist: trusty
language: node_js
node_js: 8.9
node_js: 8.11

cache:
directories:
Expand All @@ -12,7 +12,7 @@ addons:
chrome: stable

before_script:
- npm install -g bower
- npm install -g bower polymer-cli@next
- bower install

env:
Expand All @@ -21,7 +21,6 @@ env:

script:
- if [[ "$POLYMER" = "2" ]]; then
npm install -g polymer-cli &&
npm install &&
gulp lint version:check &&
polymer lint --rules polymer-2 --input ./src/*.html ./theme/**/*.html &&
Expand All @@ -33,15 +32,15 @@ script:
fi

- if [[ "$POLYMER" = "3" ]]; then
npm install -g yarn magi-cli polymer-cli@next &&
npm install -g yarn magi-cli &&
(cd .. && git clone --depth 1 -b vaadin-components git://github.com/web-padawan/polymer-modulizer.git && cd polymer-modulizer && npm link) &&
rm -rf node_modules &&
magi p3-convert --out . --import-style=name &&
yarn install --flat &&
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
xvfb-run -s '-screen 0 1024x768x24' polymer test --module-resolution=node --npm -l chrome;
xvfb-run -s '-screen 0 1024x768x24' polymer test --module-resolution=node --npm;
else
polymer test --module-resolution=node --npm --env saucelabs-p3;
polymer test --module-resolution=node --npm --env saucelabs;
fi;
fi

Expand Down
33 changes: 18 additions & 15 deletions wct.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,40 @@ var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;

module.exports = {
testTimeout: 180 * 1000,
verbose: true,
registerHooks: function(context) {
var saucelabsPlatforms = [
'Windows 10/chrome@65',
'Windows 10/firefox@59',
const saucelabsPlatformsMobile = [
'macOS 10.12/[email protected]',
'macOS 10.12/[email protected]',
'Windows 10/microsoftedge@15',
'Windows 10/internet explorer@11',
'macOS 10.12/[email protected]',
'macOS 10.12/[email protected]',
'macOS 9.3.2/[email protected]'
];

var saucelabsPlatformsP3 = [
'macOS 10.12/[email protected]',
'macOS 10.12/[email protected]',
const saucelabsPlatformsMicrosoft = [
'Windows 10/microsoftedge@16',
'Windows 10/internet explorer@11'
];

const saucelabsPlatformsDesktop = [
'Windows 10/chrome@65',
'macOS 10.12/[email protected]',
'Windows 10/firefox@59',
'Windows 10/microsoftedge@16'
'macOS 10.12/[email protected]'
];

const saucelabsPlatforms = [
...saucelabsPlatformsMobile,
...saucelabsPlatformsMicrosoft,
...saucelabsPlatformsDesktop
];

var cronPlatforms = [
const cronPlatforms = [
'Android/chrome',
'Windows 10/chrome@65',
'Windows 10/firefox@59'
];

if (env === 'saucelabs') {
context.options.plugins.sauce.browsers = saucelabsPlatforms;
} else if (env === 'saucelabs-p3') {
context.options.plugins.sauce.browsers = saucelabsPlatformsP3;
} else if (env === 'saucelabs-cron') {
context.options.plugins.sauce.browsers = cronPlatforms;
}
Expand Down

0 comments on commit bd0dffb

Please sign in to comment.