Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

Commit f8e0220

Browse files
mgechevjeffbcross
authored andcommitted
feat(AppShell): run tests in CI (#56)
1 parent f36ff2f commit f8e0220

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
language: node_js
22
node_js: "4.2.1"
3+
4+
before_install:
5+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi # Karma CI
6+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
7+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
8+
39
install: ./install.sh
410
script: ./test.sh

app-shell/config/karma.conf.js

+4
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ module.exports = function (config) {
3939
browsers: ['Chrome'],
4040
singleRun: false
4141
});
42+
if (process.env.TRAVIS || process.env.CIRCLECI) {
43+
config.browsers = ['Chrome_travis_ci'];
44+
config.singleRun = true;
45+
}
4246
};

install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/bash
2+
npm config set registry http://registry.npmjs.org/
23
cd ./service-worker/worker
34
npm install
5+
cd ../../app-shell
6+
npm install
47

test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
22
cd ./service-worker/worker
33
gulp test
4+
cd ../../app-shell
5+
./node_modules/.bin/ng test --watch=false
46

0 commit comments

Comments
 (0)