Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 55b6a25

Browse files
committed
chore(travis): simplify and improve config
Includes the following changes: - Run tests on macOS and Windows as well. - Run tests against the current Node.js LTS version (v10.x). - Cache npm cache directory between builds.
1 parent d1ee483 commit 55b6a25

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.travis.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
sudo: required
21
dist: trusty
32

43
language: node_js
54
node_js:
6-
- 6
5+
- 10
76

8-
install:
9-
- export DISPLAY=:99.0
10-
- sh -e /etc/init.d/xvfb start
11-
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
12-
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
13-
- sudo apt-get update -q
14-
- sudo apt-get install -q google-chrome-stable
7+
addons:
8+
chrome: stable
9+
10+
cache:
11+
directories:
12+
- "$HOME/.npm"
1513

16-
before_script:
17-
- npm install
14+
before_install:
15+
- export DISPLAY=":99.0";
16+
- sh -e /etc/init.d/xvfb start;
17+
18+
install:
19+
- npm install;
1820

1921
script:
20-
- npm run test-single-run
21-
- (npm start > /dev/null &) && (npm run protractor)
22+
- npm run test-single-run;
23+
- (npm start > /dev/null &) && npm run protractor;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"test": "karma start karma.conf.js",
3434
"test-single-run": "npm test -- --single-run",
3535
"preupdate-webdriver": "npm install",
36-
"update-webdriver": "webdriver-manager update",
36+
"update-webdriver": "webdriver-manager update --gecko false",
3737
"preprotractor": "npm run update-webdriver",
3838
"protractor": "protractor e2e-tests/protractor.conf.js",
3939
"update-index-async": "node --eval \"var fs=require('fs'),indexFile='app/index-async.html',loaderFile='app/lib/angular-loader/angular-loader.min.js',loaderText=fs.readFileSync(loaderFile,'utf-8').split(/sourceMappingURL=angular-loader.min.js.map/).join('sourceMappingURL=lib/angular-loader/angular-loader.min.js.map'),indexText=fs.readFileSync(indexFile,'utf-8').split(/\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/).join('//@@NG_LOADER_START@@\\n'+loaderText+' //@@NG_LOADER_END@@');fs.writeFileSync(indexFile,indexText);\""

0 commit comments

Comments
 (0)