-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
52 lines (46 loc) · 2.44 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
47
48
49
50
51
52
language: php
sudo: required
php:
- '7.2'
- '7.1'
- '7.0'
env:
global:
- MYSQL_CONN="host=localhost;dbname=travis_ci_test;user=root;password="
- PG_CONN="host=localhost;port=5432;dbname=travis_ci_test;user=postgres;password="
- SQLITE_CONN="tests/travis.sqlite"
addons:
- postgresql: "9.5"
- mariadb: '10.0'
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y graphviz memcached
before_script:
- sudo service memcached restart
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- mysql -e 'CREATE DATABASE travis_ci_test;'
- psql -c 'create database travis_ci_test;' -U postgres
- if [[ "$TRAVIS_OS_NAME" == 'linux' ]] ; then sudo apt-get install rsync ; fi
- touch travis.php.ini
- echo "extension = memcached.so" >> travis.php.ini
- sudo chmod 0777 travis.php.ini
- pecl config-set php_ini travis.php.ini
- pear config-set php_ini travis.php.ini
- phpenv config-add travis.php.ini
- composer install
script:
- mkdir build && mkdir build/logs
- export COMPOSER_PROCESS_TIMEOUT=600 #yup. Tests are taking a long time now. pbkdf2 is slow.
- composer test
after_script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then php vendor/bin/codacycoverage clover build/logs/clover.xml ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then composer api-gen ;fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then curl -O https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py && sudo pip install mkdocs ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then cd Documentation && mkdocs build && cd ../ ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then cd Documentation && git clone -b gh-pages $GIT_REMOTE ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then rsync -avh --progress ./site/ ./Gishiki ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then git config --global user.email "[email protected]" && git config --global user.name "Denis Benato" && git config --global push.default matching ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then cd Gishiki && git add * && git commit -m "deploy doc from commit $TRAVIS_BRANCH ( $TRAVIS_COMMIT ) " && git push ; fi