Skip to content

Commit

Permalink
chore: fix running CRON tests in SauceLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Apr 27, 2020
1 parent 9ea98fa commit 6fed1e7
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .travis.yml
Expand Up @@ -8,7 +8,7 @@ cache:
- node_modules

addons:
firefox: "66.0"
firefox: latest
chrome: stable

jobs:
Expand All @@ -22,44 +22,41 @@ jobs:
- if: type = pull_request
env: POLYMER=2
addons:
firefox: "66.0"
firefox: latest
chrome: stable
- if: type = pull_request
env: POLYMER=3
addons:
firefox: "66.0"
firefox: latest
chrome: stable
- if: type = cron
env: TEST_SUITE=unit_tests POLYMER=2

script:
- if [[ "$POLYMER" = "2" ]]; then
npm -q i && npm i -q --no-save bower polymer-cli && bower -q i &&
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
if [[ "$TEST_SUITE" = "visual_tests" ]]; then
npm i -q --no-save gemini@^4.0.0 gemini-sauce gemini-polyserve &&
gemini test test/visual;
else
wct --env saucelabs;
fi;
else
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
npm run check &&
npm run lint &&
xvfb-run -s '-screen 0 1024x768x24' wct;
fi &&
if [[ "$TRAVIS_EVENT_TYPE" = "cron" && "$TEST_SUITE" = "unit_tests" ]]; then
elif [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]; then
wct --env saucelabs-cron;
elif [[ "$TEST_SUITE" = "visual_tests" ]]; then
npm i -q --no-save gemini@^4.0.0 gemini-sauce gemini-polyserve &&
gemini test test/visual;
else
wct --env saucelabs;
fi;
fi
- if [[ "$POLYMER" = "3" ]]; then
npm --no-save -q install -g yarn bower magi-cli web-component-tester polymer-modulizer &&
rm -rf node_modules &&
magi p3-convert --out . --import-style=name &&
yarn install --flat &&
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
wct --npm --env saucelabs;
else
if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
xvfb-run -s '-screen 0 1024x768x24' wct --npm;
else
wct --npm --env saucelabs;
fi;
fi

Expand Down

0 comments on commit 6fed1e7

Please sign in to comment.