-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
51 lines (43 loc) · 1.2 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
language: php
matrix:
fast_finish: true
include:
- php: 7
env: UNIT_TESTS=yes PHP_LINT=yes
sudo: false
services:
- mysql
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
notifications:
slack:
on_pull_requests: false
rooms:
secure: Hj6TJkhowVHomFckDSjen3VZVKZF8p0S55gARsIPOSBnoRzVe8w6UI31uu7HQ57WUAPXxt14bByFrle7QOAfis+cl4I+9OpvaCJ8kMXOH22h7x3pEQIpouRVj+Tm66inD4YCKU/yHuIx18NkgdNmaUZ7We3TKOX8+LJAQgQgrOg=
on_success: change
on_failure: always
before_script:
- phpenv config-rm xdebug.ini
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- mysql -e 'create database t3bot;'
- cp .env.example .env
- composer install
- ./bin/doctrine-migrations --no-interaction --configuration=Build/migrations.xml --db-configuration=Build/migrations-db.php migrations:migrate
script:
- |
if [[ "$UNIT_TESTS" == "yes" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit -c Build/UnitTests.xml
fi
- |-
if [[ "$PHP_LINT" == "yes" ]]; then
echo;
echo "Running php lint";
find . -name \*.php -not -path "./vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
fi