forked from tarlepp/symfony-flex-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (79 loc) · 3.21 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: php
sudo: true
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.sonar/cache
git:
depth: 1
services:
- mysql
php:
- 7.1
- 7.2
- master
- nightly
matrix:
fast_finish: true
allow_failures:
- php: master
- php: nightly
include:
- php: 7.1
env:
- USE_XDEBUG=false
- php: 7.2
env:
- USE_XDEBUG=false
- php: 7.1
env:
- COVERAGE=true
addons:
sonarcloud:
organization: "tarlepp-github"
token:
secure: "E3s0zb9To6w9quiANztreSuvrXJYmtJksBizxiHZqAUfmsMINfDDpegjbyvto64+wzUKlgI1ySOPpbSAQOdLUzjfuIGK7WGex8SBcH35E+W/NFRuQNgqo2UqROdNt0iCtwQf8R0K6EYEBoYYBQMoizZpGAbAxPbSgVULa8UhxLz/kyWwSLFauoC6kjO2ctyVsFBlg95uu6tUtI3XYugLegai+9gOdEbT4ZMeJfbsUcsHayHw5vDq2F/7lZubDjFMc50wXBvW27x53J3m4fRZhgC3e3AaEBhjoJygWK9Uw8ZdHa/Br1agDz4xC8v7YXlf7FFdRC2zpjl51WSs50qkRDB8ubkJMgxuqLjIXTosFGgWdmwjI99HT9Mv1C0wls74uDdfRQh2dDysQe+dN3yE1kGORxTHxDqnBbp7Fx7k1UCNIzCnmEGhLxstBQgl99S4n5i2N6fZwjcqb3Vqaib9TaEJ2PLZkZB09bsN9Dmax2ONAA0MNl5oCaZC0nq1Vn7n0GC9XGnHfJ/XoWgQt6+mkbhe2cfLTJ7YekecZOZHm/zkDiS6qfTz3hcLqyWWkW7XTL2c8bD+lHNSUE+KGEjSYiR6kpMDHb2IMNbLJV5pANLok/XJhB2n6IaLYwb5FND9Ao/MZ/WxZxeA0br8vXL1JIoXNRLmH+7yAbjtzlfTyiY="
jdk:
- oraclejdk8
before_install:
- cp .env.travis .env
- cp .env.travis .env.test
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_1;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_2;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_3;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_4;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_5;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_6;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_7;'
- mysql -e 'CREATE DATABASE IF NOT EXISTS travis_test_8;'
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- sudo add-apt-repository ppa:ondrej/php -y
- sudo apt-get update -q
- sudo apt-get install libsodium-dev -y
- pecl install libsodium
install:
- composer install
- make generate-jwt-keys
before_script:
- if [[ ${USE_XDEBUG} == false ]]; then phpenv config-rm xdebug.ini; fi
- php --version
- php ./bin/console --version
- php ./vendor/bin/phpunit --version
- php ./vendor/bin/requirements-checker
- mkdir -p build/fastest
- if [[ $COVERAGE == true ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [[ $COVERAGE == true ]]; then chmod +x ./cc-test-reporter; fi
- if [[ $COVERAGE == true ]]; then ./cc-test-reporter before-build; fi
script:
- make phpcs
- make run-tests-fastest
# - make run-tests
after_success:
- if [[ $COVERAGE == true ]]; then make merge-clover; fi
- if [[ $COVERAGE == true ]]; then make merge-junit; fi
- if [[ $COVERAGE == true ]]; then php ./vendor/bin/php-coveralls -v; fi
- if [[ $COVERAGE == true ]]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT; fi
- if [[ $COVERAGE == true ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
- if [[ $COVERAGE == true ]]; then sonar-scanner; fi
after_failure:
- cat var/logs/*.log