-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
91 lines (76 loc) · 2.14 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
sudo: false
language: php
php:
- '7.4'
- '7.3'
- '7.2'
- '7.1'
matrix:
fast_finish: true
allow_failures:
- php: 'master'
services:
- redis-server
git:
depth: 1
branches:
only:
- master
- development
cache:
apt: true
ccache: true
timeout: 604800
directories:
- $HOME/.composer/cache
- $HOME/bin
env:
global:
- REDIS_HOST="127.0.0.1"
- REDIS_PORT="6379"
- REDIS_TIMEOUT="0.0"
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
before_install:
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
- ulimit -c unlimited -S || true
install:
- composer install $DEFAULT_COMPOSER_FLAGS
- |
if [ ! -f $HOME/bin/infection ]; then
wget https://github.com/infection/infection/releases/download/0.10.3/infection.phar
wget https://github.com/infection/infection/releases/download/0.10.3/infection.phar.asc
chmod +x infection.phar
gpg --keyserver hkps.pool.sks-keyservers.net --recv-keys 493B4AA0
gpg --with-fingerprint --verify infection.phar.asc infection.phar
mkdir -p $HOME/bin && mv infection.phar $HOME/bin/infection
fi
before_script:
- composer diagnose || true
script:
- ./vendor/bin/phpunit --disallow-test-output
after_success:
- if [[ ! -z "${CODECOV_TOKEN}" ]]; then (bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"); fi;
after_failure:
- $(phpenv which php) -v
- for m in `$(phpenv which php) -m | grep -e 'json\|pcntl\|posix\|sockets\|pcre'`; do php --ri $m; done
notifications:
email: false
jobs:
include:
- stage: Static Code Analysis
php: 7.4
env: PHPStan
script:
- ./vendor/bin/phpstan analyse src/ --level max
- stage: Static Code Analysis
php: 7.4
env: PHP_CodeSniffer
before_script:
- phpenv config-rm xdebug.ini || true
script:
- ./vendor/bin/phpcs src
- stage: Mutation Testing
php: 7.4
script:
- ./vendor/bin/phpunit --disallow-test-output
- $HOME/bin/infection --threads=4