Skip to content

Commit

Permalink
chore(ci): Improve CI builds (#605)
Browse files Browse the repository at this point in the history
Remove some extraneous settings at travis, and switch to using Firefox
at Travis rather than saucelabs.

Use the yarn that is installed, see https://docs.travis-ci.com/user/build-environment-updates/2017-12-12/
  • Loading branch information
bantic authored Feb 23, 2018
1 parent 5cc0112 commit ce378e2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ dist: trusty

addons:
chrome: stable
firefox: "latest"
sauce_connect:
username: "mobiledoc-kit"
access_key: "f9cad21d-1141-452d-8f64-c6ba3f43faa6"

env:
- MOZ_HEADLESS=1 # necessary for Firefox headless, see https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Firefox-addon-in-headless-mode

cache:
yarn: true

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.27.5
- export PATH=$HOME/.yarn/bin:$PATH

# Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024
before_script:
- "sudo chown root /opt/google/chrome/chrome-sandbox"
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"

script:
- yarn test:ci
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"repository": "https://github.com/bustle/mobiledoc-kit",
"scripts": {
"start": "broccoli serve --host 0.0.0.0",
"test:ci": "npm run build:docs && npm run build && testem ci -f testem-ci.json",
"test": "npm run build:docs && npm run build && testem ci -f testem.json",
"test:ci": "npm run build:docs && npm run build && testem ci -f testem-ci.js",
"test": "npm run build:docs && npm run build && testem ci -f testem.js",
"build": "rm -rf dist && broccoli build dist",
"build:docs": "jsdoc -c ./.jsdoc",
"build:website": "npm run build && npm run build:docs && ./bin/build-website.sh",
Expand Down
13 changes: 5 additions & 8 deletions testem-ci.json → testem-ci.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
/* eslint-env node */
module.exports = {
"framework": "qunit",
"parallel": 5,
"disable_watching": true,
Expand All @@ -17,11 +18,6 @@
"args": ["-b", "internet explorer", "-v", "11", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_Firefox_Current": {
"exe": "saucie",
"args": ["-b", "firefox", "-p", "Windows 10", "-v", "latest", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_Safari_Current": {
"exe": "saucie",
"args": ["-b", "safari", "-v", "9", "--no-connect", "-u"],
Expand All @@ -30,17 +26,18 @@
},
"launch_in_ci": [
"Chrome",
"SL_Firefox_Current",
"Firefox",
"SL_Safari_Current",
"SL_MS_Edge",
"SL_IE_11"
],
"browser_args": {
"Chrome": [
"--no-sandbox", // Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024
"--disable-gpu",
"--headless",
"--remote-debugging-port=9222",
"--window-size=1440,900"
]
}
}
};
5 changes: 3 additions & 2 deletions testem.json → testem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
/* eslint-env node */
module.exports = {
"framework": "qunit",
"test_page": "dist/tests/index.html?hidepassed",
"src_files": [
Expand All @@ -21,4 +22,4 @@
"--window-size=1440,900"
]
}
}
};

0 comments on commit ce378e2

Please sign in to comment.