This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from zalando-incubator/e2e-tests
chore(travis): run e2e tests
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,43 @@ | ||
dist: trusty | ||
|
||
language: node_js | ||
|
||
node_js: | ||
- '7' | ||
|
||
addons: | ||
chrome: stable | ||
|
||
before_script: | ||
# install aws cli to upload artifacts | ||
- sudo pip install awscli | ||
|
||
- npm install -q | ||
- 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_script: | ||
- aws s3 cp ../hexo-theme-doc-site/tests_output s3://${ARTIFACTS_BUCKET}/${TRAVIS_BUILD_NUMBER} --recursive | ||
|
||
after_success: | ||
cat target/coverage/lcov.info | ./node_modules/.bin/codacy-coverage |