forked from Ocramius/PackageVersions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (27 loc) · 1.31 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
language: php
sudo: false
php:
- 7.4
env:
- LOCKED_DEPENDENCIES=1
- DEPENDENCIES=""
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- DEPENDENCIES="--classmap-authoritative"
- DEPENDENCIES="--no-scripts"
before_script:
# aliasing current branch as `master`, since otherwise composer cannot determine the current branch-alias
- git branch -D master || true
- git checkout -b master
- composer self-update
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then composer install; fi
- if [[ $LOCKED_DEPENDENCIES = '' ]]; then composer update $DEPENDENCIES; fi
script:
- if [[ "$DEPENDENCIES" != '--no-scripts' ]]; then ./vendor/bin/psalm; fi
# TODO see https://github.com/vimeo/psalm/issues/1881 https://github.com/Ocramius/PackageVersions/issues/90 :
# - ! ./vendor/bin/psalm test/static-analysis/unhappy-path/unexpected-package-name.php
- ./vendor/bin/phpunit --disallow-test-output --coverage-clover=clover.xml
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then ./vendor/bin/phpcs; fi
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then ./vendor/bin/infection --min-msi=100 --min-covered-msi=100; fi
after_script:
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi