forked from vimeo/psalm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (84 loc) · 3.22 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
92
93
94
95
96
dist: xenial
language: php
stages:
- Code style analysis
- test
- Phar build
# - Code coverage analysis
php:
- 7.1.3
- 7.2
- 7.3
- 7.4
- 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=
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
- if [[ "$TRAVIS_TAG" = '' ]]; then export COMPOSER_ROOT_VERSION=dev-master; fi
# disable default memory limit
- echo memory_limit = 2G >> $INI
- if [[ "$XDEBUG" = 'false' && -f $INI_DIR/xdebug.ini ]]; then phpenv config-rm xdebug.ini; fi
- if [[ $TRAVIS_PHP_VERSION = nightly ]]; then export DEFAULT_COMPOSER_FLAGS="$DEFAULT_COMPOSER_FLAGS --ignore-platform-reqs"; fi
- composer validate
- 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
# Base test matrix (php/env)
matrix:
fast_finish: true
allow_failures:
- php: nightly
# Additional stages
jobs:
include:
- stage: Code style analysis
php: 7.3
env: DEPS="high"
script:
- vendor/bin/phpcs
- stage: Ensure no transient used dependencies
php: 7.3
env: DEPS="high"
script:
- composer require --dev maglnet/composer-require-checker:^2.0.0
- ./vendor/bin/composer-require-checker check --config-file=bin/composer-require-checker-config.json ./composer.json
- stage: Phar build
php: 7.3
env: DEPS="high"
script: bin/build-phar.sh
deploy:
# deploy tagged releases to github releases page
- provider: releases
skip_cleanup: true
on:
tags: true
repo: vimeo/psalm
api_key: $GITHUB_TOKEN
file:
- build/psalm.phar
- build/psalm.phar.asc
# deploy built phar to github.com/psalm/phar repo for all branches and tags,
# but not for pull requests
- provider: script
skip_cleanup: true
on:
all_branches: true
condition: ' "$TRAVIS_PULL_REQUEST" = "false" '
script: bin/travis-deploy-phar.sh