Last active
January 3, 2020 00:20
-
-
Save AhsanAyaz/820d40da5d1aa45c138f9e55d5193d34 to your computer and use it in GitHub Desktop.
Sample TravisCI Yaml file for Angular Project
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
language: node_js | |
node_js: | |
- "7" | |
sudo: true | |
dist: trusty | |
branches: | |
only: | |
- master | |
before_script: | |
- export CHROME_BIN=/usr/bin/google-chrome | |
- export DISPLAY=:99.0 | |
- sh -e /etc/init.d/xvfb start | |
- sudo apt-get update | |
- sudo apt-get install -y libappindicator1 fonts-liberation | |
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
- sudo dpkg -i google-chrome*.deb | |
script: | |
- ng test --watch false -cc | |
- npm run e2e | |
- ng build -bh "https://ahsanayaz.github.io/ng-traffic-ci/" | |
deploy: | |
provider: pages | |
skip_cleanup: true | |
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard | |
local_dir: dist | |
on: | |
branch: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My .travis.yml is cleaner:
You can avoid all the setup by using Travis' Chrome addon and their provided
xvfb-run
wrapper.