forked from funiq/geoPHP
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
77 lines (65 loc) · 1.96 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
# docs available at http://docs.travis-ci.com/user/languages/php/
language: php
os: linux
dist: xenial
version: ~> 1
before_script:
- composer self-update
- sudo apt-get install -y libgeos-dev
- chmod ugo+x tests/install_geos_extension.sh
- ./tests/install_geos_extension.sh
cache:
directories:
- vendor
- $HOME/.composer/cache/files
install:
- if [[ -z $PHPSTAN ]]; then export COMPOSER_REMOVE="phpstan/phpstan"; fi
- if [[ $DISABLE_UNIT ]]; then export COMPOSER_REMOVE="$COMPOSER_REMOVE phpunit/phpunit"; fi
- if [[ $TRAVIS_PHP_VERSION = "nightly" ]]; then export COMPOSER_FLAGS="--ignore-platform-reqs"; fi
- |
if [[ $COMPOSER_REMOVE ]]; then
echo "Removing $COMPOSER_REMOVE dependencies"
composer remove --dev --no-update --no-interaction $COMPOSER_FLAGS $COMPOSER_REMOVE
fi
- composer install --prefer-dist --no-interaction $COMPOSER_FLAGS
# TODO Install geos library -- as a matrix test
# TODO optionally set up a postgis database for testing
script:
- mkdir -p build/logs
- if [[ -z $DISABLE_UNIT ]]; then composer unit-clover; fi
- composer test-input
- composer performance
jobs:
include:
- stage: Smoke
php: 7.4
env: PHPCS=1
script: composer cs
- stage: Smoke
php: 7.4
env: PHPCS_WARNING=1
script: composer cs-warning
- stage: Smoke
php: 7.4
env: PHPSTAN=1
script: vendor/bin/phpstan analyse src
- stage: Test
php: 7.0
- stage: Test
php: 7.1
- stage: Test
php: 7.2
- stage: Test
php: 7.3
- stage: Test
php: 7.4
- php: nightly
# FIXME: allow_failures doesn't appear to work with stages defined. How to solve that?
allow_failures:
- php: nightly
fast_finish: true
after_success:
- |
- if [[ -f "build/logs/clover.xml" && $TRAVIS_PHP_VERSION != "nightly" ]]; then
travis_retry php vendor/bin/php-coveralls -v;
fi