forked from phayes/geoPHP
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
83 lines (71 loc) · 2.09 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
# docs available at http://docs.travis-ci.com/user/languages/php/
language: php
os: linux
dist: bionic
version: ~> 1
before_script:
- composer self-update
cache:
directories:
- vendor
- $HOME/.composer/cache/files
- build/cache
- /tmp/phpstan
install:
- composer validate
- if [[ -z $PHPSTAN ]]; then export COMPOSER_REMOVE="phpstan/phpstan"; fi
- if [[ $DISABLE_UNIT ]]; then export COMPOSER_REMOVE="$COMPOSER_REMOVE phpunit/phpunit"; fi
- if [[ $DISABLE_BENCH ]]; then export COMPOSER_REMOVE="$COMPOSER_REMOVE phpbench/phpbench"; fi
- if [[ $TRAVIS_PHP_VERSION = "nightly" ]]; then export COMPOSER_FLAGS="--ignore-platform-req=php+"; fi
- |
if [[ $COMPOSER_REMOVE ]]; then
echo "Removing $COMPOSER_REMOVE dependencies"
composer remove --dev --no-update --no-interaction $COMPOSER_FLAGS $COMPOSER_REMOVE
fi
- composer update --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/cache
- if [[ -z $DISABLE_UNIT ]]; then composer run unit; fi
- composer run test-input
- composer run performance
- if [[ -z $DISABLE_BENCH ]]; then vendor/bin/phpbench run --report=aggregate --progress=plain --tag=$TRAVIS_BRANCH; fi
jobs:
include:
- stage: Smoke
php: 8.1
env: PHPCS=1
script: composer run cs-warning
- stage: Smoke
php: 8.1
env: PHPSTAN=1
script: vendor/bin/phpstan analyse
- stage: Test
php: 7.1
name: PHP 7.1 without Unit tests and Bench
env:
- DISABLE_UNIT=1
- DISABLE_BENCH=1
- stage: Test
php: 7.2
name: PHP 7.2 without Unit tests
env: DISABLE_UNIT=1
- stage: Test
php: 7.3
- stage: Test
php: 7.4
- stage: Test
php: 8.0
- stage: Test
php: 8.1
- stage: Test
php: nightly
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