-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
50 lines (40 loc) · 1.35 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
dist: bionic
language: php
php:
- 7.4
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.composer/cache/repo
#matrix:
# allow_failures:
# - php: 7.4
branches:
only:
- master
before_install:
# execute all of the commands which need to be executed
# before installing dependencies
- sudo apt update
- sudo apt install php-imagick
- pecl channel-update pecl.php.net
- yes | pecl install imagick
# install phpcs (remove after composer.lock update / use vendor package than)
# see also: https://github.com/squizlabs/PHP_CodeSniffer
- sudo apt install php-codesniffer
install:
# install all of the dependencies you need hereK
- composer install
before_script:
# execute all of the commands which need to be executed
# before running actual tests
- phpenv config-rm xdebug.ini || return 0 # disable xdebug for faster execution
script:
# execute all of the commands which
# should make the build pass or fail
- which php # output used PHP binary
- php --version # check travis's PHP version: should be >= 7.4 for strict declared types of properties
- phpcs --standard=PSR2 $(find ./src -name '*.php')
# run phpunit via sudo: otherwise fails w/ "Permission Denied" errors
- sudo /home/travis/.phpenv/shims/php vendor/bin/phpunit tests/
- vendor/bin/phpstan analyse src -c var/ci/phpstan/phpstan.neon