Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #48 from zalando-incubator/e2e-tests
Browse files Browse the repository at this point in the history
chore(travis): run e2e tests
  • Loading branch information
bhaskarmelkani authored Nov 15, 2017
2 parents 21e1c56 + 8b6a6e2 commit 127f628
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .travis.yml
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

0 comments on commit 127f628

Please # to comment.