forked from mishal/GeoPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (46 loc) · 1.46 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
# docs available at http://docs.travis-ci.com/user/languages/php/
# example available at https://github.com/travis-ci/travis-ci-php-example
language: php
before_script:
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi;'
- composer self-update
- psql -c 'CREATE DATABASE geophp;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d geophp
- psql -c 'CREATE TABLE test (name text, type text, geom geometry);' -U postgres -d geophp
# Store all files in your own bin
- mkdir bin
- export PATH=$PATH:$PWD/bin/
# Install phpmd
- wget --no-check-certificate -c https://static.phpmd.org/php/latest/phpmd.phar
- install --mode 0755 phpmd.phar $PWD/bin/phpmd
- if [[ $WITH_GEOS == true ]]; then bash $PWD/.travis/install_geos.sh; fi;
install:
- composer install
script:
- psql --version
- psql -d geophp -c 'SELECT PostGIS_version();' -U postgres
- GEOPHP_POSTGIS_TEST_ENABLED=true phpunit
- php ./tests/bc.php
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpmd lib text ./.phpmd.xml; fi;'
env:
- WITH_GEOS=true VERSION=3.5.0
- WITH_GEOS=true VERSION=3.4.2
- WITH_GEOS=false
# run tests on the following versions
php:
- 7
- 5.6
- 5.5
- 5.4
- 5.3
- hhvm
# try running against postgres 9.3
addons:
postgresql: "9.3"
matrix:
exclude:
# hhmv does not support geos
- php: hhvm
env: WITH_GEOS=true VERSION=3.5.0
- php: hhvm
env: WITH_GEOS=true VERSION=3.4.2