-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
46 lines (42 loc) · 2.18 KB
/
.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
37
38
39
40
41
42
43
44
45
46
sudo: required # use Travis Trusty env (http://docs.travis-ci.com/user/ci-environment/)
dist: trusty
language: generic # PHP is not available in "mega" image, so we use "minimal" image and setup runtimes separately
before_install:
# Install execution environment (php, phpunit, mysql, composer)
- sudo apt-get update
- sudo apt-get install php5 php5-gd php5-mcrypt php5-curl php5-intl php5-xsl php5-mysql
- sudo php5enmod mcrypt
- sudo apt-get install phpunit
- sudo apt-get install mysql-client-core-5.6 mysql-client-5.6 mysql-server-5.6
- sudo php -r "readfile('https://getcomposer.org/installer');" | sudo php -- --install-dir=/usr/local/bin --filename=composer
- sudo apt-get remove php5-xdebug # to prevent composer warning See https://getcomposer.org/xdebug
# Display versions for tools
- php --version
- phpunit --version
- composer --version
- git --version
# Setup composer to use Github OAuth Token from Travis Environment Variable
# (http://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings)
- composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN
# Get auth keys: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html
- composer config -g http-basic.repo.magento.com $M2_KEY_PUB $M2_KEY_PRIV
# Copy Travis CI configuration from template and deploy Magento 2 application
- pwd # control current path ('LOCAL_ROOT' in templates.json)
- cp deploy_cfg.sh.travis deploy_cfg.sh # create configuration for Travis from template
- cp templates.vars.json.travis templates.vars.work.json # create configuration for Travis from template
- sh deploy.sh
# Run post installation script (deploy Magento2 itself)
- sudo apt-get install php5-xdebug # install xdebug (need for codecoverage)
script:
- php ./work/vendor/bin/phpunit -c ./dev/test/coverage/phpunit.dist.xml
after_script:
- cd work
- php ./vendor/bin/coveralls -v -c ../.coveralls.yml
- cat ../build/logs/clover.xml
- cat ../build/logs/coveralls-upload.json
notifications:
email:
recipients:
on_success: change # [always|never|change], default: change
on_failure: change # [always|never|change], default: change