forked from zalando-incubator/hexo-theme-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (28 loc) · 906 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
dist: trusty
language: node_js
node_js:
- '7'
addons:
chrome: stable
before_script:
- npm link
# prepare e2e test environment
- git clone --depth=50 --branch=gh-pages-source https://github.com/zalando-incubator/hexo-theme-doc ../hexo-theme-doc-site
- cd ../hexo-theme-doc-site && npm install -q && npm link hexo-theme-doc && npm run postinstall && npm run test:setup
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- cd $TRAVIS_BUILD_DIR
script:
# quality checks, unit test and compiling fe artifacts
- npm run lint -s
- npm run lint:report -s
- npm run test:coverage -s
- npm run compile -s
# run e2e tests
- cd ../hexo-theme-doc-site && npm run generate
- npm run serve &>/dev/null &
- sleep 5 # give server some time to start
- npm test
- cd $TRAVIS_BUILD_DIR
after_success:
cat target/coverage/lcov.info | ./node_modules/.bin/codacy-coverage