/
.travis.yml
66 lines (57 loc) · 2.48 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
#
# Lithium: the most rad php framework
#
# @copyright Copyright 2016, Union of RAD (http://union-of-rad.org)
# @license http://opensource.org/licenses/bsd-license.php The BSD License
#
language: php
services:
- mongodb
- memcache
- couchdb
- redis
env:
# Run one build with as many enabled and compatible extensions as possible.
# Keep in-sync with potential partial excludes in the `matrix` section.
- DB=sqlite PHP_EXT="opcache memcached redis apcu" TESTS=all
# Must be tested in isolation as it interferes with other opcaches.
- PHP_EXT=xcache TESTS=storage
# Test each remaining database in isolation.
- DB=mysql TESTS=data
- DB=pgsql TESTS=data
- DB=mongodb PHP_EXT=mongo TESTS=data
- DB=couchdb TESTS=data
php:
- 5.3
- 5.4
- 5.5
- 5.6
matrix:
# Mark build as failed as soon as one job failed.
fast_finish: true
before_script:
- cd ..
- cp -r lithium/tests/ci/app .
# Install libraries.
- mv lithium app/libraries/
- git clone --branch=1.0 --depth=1 --quiet git://github.com/UnionOfRAD/li3_fixtures.git app/libraries/li3_fixtures
# Switch into the new app.
- cd app
# Install environment dependencies.
- php libraries/lithium/tests/ci/depends.php
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database lithium_test; create database lithium_test_alternative;'; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database lithium_test;' -U postgres; psql -c 'create database lithium_test_alternative;' -U postgres; fi"
script:
# Run all tests.
- sh -c "if [ '$TESTS' = 'all' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/cases; fi"
- sh -c "if [ '$TESTS' = 'all' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/integration; fi"
# Run just the database related tests.
- sh -c "if [ '$TESTS' = 'data' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/cases/data; fi"
- sh -c "if [ '$TESTS' = 'data' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/integration/data; fi"
# Run just the storage related tests.
- sh -c "if [ '$TESTS' = 'storage' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/cases/storage; fi"
- sh -c "if [ '$TESTS' = 'storage' ]; then libraries/lithium/console/li3 test --filters=Profiler libraries/lithium/tests/integration/storage; fi"
notifications:
email: false
# Enable container based infra.
sudo: false