1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
psalm/.travis.yml
2018-11-28 16:41:13 -05:00

92 lines
4.2 KiB
YAML

language: php
stages:
- Code style analysis
- test
- Code coverage analysis
- Phar build
php:
- 7.0
- 7.1
- 7.2
- nightly
env:
matrix:
- DEPS="high"
- DEPS="low"
global:
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-suggest --prefer-source"
- XDEBUG="false"
# generated with travis encrypt -r vimeo/psalm --org GITHUB_TOKEN="<secret oauth token>"
- secure: Ayjp10v6IWeJX3ThWvPxlv0gkuTuvu30lsdQCjop+vS0Kv+6/IEOdSOxtm0tEWacq9EFCViWRKh9zxiwPtoi0wxGdzGGws+UtIJxew6Vy8HDCEH8nY4k50eElKUWI4YhVbiSdZEZ+Bd9kO0qGEBH9iWh8Tc8MP2Hklx7lOf+zUTSm8vpv+idcCxwGCvQMaMc5NhfnkgGq95/UU3iOvCi5/wkIFnSnoccxmZE2zsxI1e355ipa0uoe8/Ml6vK0NrZ0aBZwZfItsIuhRcL4Cm5kyar+Ao/mn9Zw8CHbfESrIMomRI7ZxwPNFj+sR/wCvEasIGHRxH8B9F4d8SmAoHR1CrmM/zyWRon73CfRb56M4VGG1hyqTr1GYHpBgZKSOYA8TKyOjD8EHGvevfHpJoGVNxf0+vAfdizlVJvkYhzSz/VjpOZO8rfOct4deNcpCVuVGg5uOGeg5P7coVniGHLHTm3JozK9Ia+ZLePtr3l/NuoW5dXVF1fdroCyQS2X0VSXALnnTPzcIQYsmpCk8yJ8uXorxj4dJHhstyll1jemJjxT7HJ1ASPUOTsPu9u9EoBDHQxOGa5b2/7chyV+EhrYV899RKZ4xEPzpC619sWgtZJci3oLcebU1BY42pIr94UqtwcJKhriwV72VpKvCG/eqOKLhXq355TYRx2dK05a5w=
- secure: ogitrDTh8Xj+m1K3M0nKpHwNaCcIJ0SajUWI/g5AvjnbIMyf+g0M63hPuv/4z+7WGIDCwm3SxupIyRqdvkXprwl8jRmf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NAZAM13utka1I4Rwvm+TXm7NBVK4oTroFoHphYexOJeJ6oUVq+bPN8vqwTMo7yZaD4FzG9gowIbd4/APNalkReaPD12rm9HflWTBXAF9DKGXN4FKuu9O1CZHKrmXsfA6t+FfYtdh0aCDwfvQO0M4XTBuDO9aAXtSZ8+krDSWYFnD7xYEcpanhgPSyBnoraNhQiDLizHo84NzuEf0nFk=
cache:
directories:
- ./vendor
before_install:
# determine INI file
- export INI_DIR=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d
- export INI=$INI_DIR/travis.ini
# disable default memory limit
- echo memory_limit = 2G >> $INI
- if [[ "$XDEBUG" = 'false' && -f $INI_DIR/xdebug.ini ]]; then phpenv config-rm xdebug.ini; fi
- composer clear-cache
install:
- if [[ "$DEPS" = 'high' ]]; then travis_retry composer $DEFAULT_COMPOSER_FLAGS update; fi
- if [[ "$DEPS" = 'low' ]]; then travis_retry composer $DEFAULT_COMPOSER_FLAGS --prefer-lowest --prefer-stable update; fi
script:
- vendor/bin/phpunit
- ./psalm --find-dead-code
# Base test matrix (php/env)
matrix:
fast_finish: true
allow_failures:
- php: nightly
exclude: # covered in Code coverage stage
- php: 7.2
env: DEPS="high"
# Additional stages
jobs:
include:
- stage: Code coverage analysis
php: 7.2
# don't disable xdebug here
env: DEPS="high" XDEBUG="true"
after_success:
- travis_retry php vendor/bin/php-coveralls -v
- stage: Code style analysis
php: 7.2
env: DEPS="high"
script:
- vendor/bin/phpcs
# always build phar, but only deploy on tag builds
- stage: Phar build
php: 7.1
env: DEPS="low"
script:
- bin/build-phar.sh --phive
before_deploy:
- echo $GPG_ENCRYPTION | gpg --passphrase-fd 0 keys.asc.gpg
- gpg --batch --yes --import keys.asc
- echo $SIGNING_KEY | gpg --passphrase-fd 0 -u B6DDD1213543D1D8 --armor --detach-sig build/phar.phar
deploy:
skip_cleanup: true
on:
tags: true
provider: releases
api_key: $GITHUB_TOKEN
file:
- build/psalm.phar
- build/psalm.phar.asc