-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
100 lines (86 loc) · 2.32 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
93
94
95
96
97
98
99
100
dist: trusty
sudo: required
language: php
php:
- 5.6
- 7.0
- 7.1
services:
- docker
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- alien
- libaio1
cache:
directories:
- $HOME/.cache/bower
- $HOME/.composer/cache
- $HOME/.npm
- docker
- /tmp/phantomjs
apt: true
env:
global:
- CORE_BRANCH=master
- APP_NAME=activity
matrix:
- DB=sqlite
branches:
only:
- master
- /^stable\d+(\.\d+)?$/
before_install:
- composer install
- which php
- more `which pecl`
- which phpize
- bash tests/.travis/before_install.sh $APP_NAME $CORE_BRANCH $DB
# Add some output debugging information
- cd ../core
- ./occ check
- ./occ status
- ./occ app:list
script:
- cd apps/$APP_NAME/
# Test the app
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then find . -name \*.php -exec php -l \"{}\" \;; fi"
- cd ../../
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then ./occ app:check-code $APP_NAME -c private -c strong-comparison; fi"
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
- cd apps/$APP_NAME/
# Run phpunit tests
- cd tests/
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then ../vendor/bin/phpunit --configuration phpunit.xml; fi"
# Create coverage report
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
- cd ../
# Run Javascript unit tests
- cd tests/js
- sh -c "if [ '$JSTESTS' = '1' ]; then npm install --deps; node_modules/karma/bin/karma start karma.config.js --single-run; fi"
- cd ../
after_success:
- bash <(curl -s https://codecov.io/bash)
matrix:
include:
- php: 5.6
env: DB=oracle
- php: 5.6
env: DB=mysql
- php: 5.6
env: DB=mysqlmb4
- php: 5.6
env: DB=pgsql
- php: 5.6
env: DB=mysql;CODECHECK=1
- php: 5.6
env: DB=mysql;CODECHECK=2
- php: 5.6
env: DB=mysql;JSTESTS=1
allow_failures:
- env: DB=mysql;CODECHECK=2
fast_finish: true