forked from phpDocumentor/phpDocumentor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (107 loc) · 4.43 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
language: php
php: [ 7.1, 7.2, nightly ]
sudo: false
branches:
except: /^(\S*)-nightly-(\S*)$/
env:
matrix:
fast_finish: true
allow_failures:
- php: nightly
install:
- travis_retry composer install --no-interaction --prefer-dist --optimize-autoloader
- travis_retry composer global require phpunit/phpunit ^6 # cannot use phpunit.phar or require-dev, because this package is a phpunit dep
script:
- /home/travis/.composer/vendor/bin/phpunit --no-coverage && bin/behat -p default
jobs:
include:
- stage: test
php: 7.1
script:
- travis_retry sudo apt install graphviz && ./bin/phpdoc run
- stage: test
php: 7.1
script:
- php ./bin/console --env=prod cache:warm && php -d phar.readonly=false tools/box.phar compile --config=box.nosign.json && bin/behat -p phar
- travis_retry sudo apt install graphviz && php build/phpDocumentor.phar run
- stage: coverage
php: 7.1
script:
- /home/travis/.composer/vendor/bin/phpunit
after_script:
- travis_retry wget --no-verbose https://phar.io/releases/phive.phar
- travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --verbose
- travis_retry wget --no-verbose https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- stage: lint
php: 7.1
services:
- docker
script:
- docker-compose run --rm ecs
- docker-compose run --rm phpstan
- stage: release
if: type IN (push)
php: 7.1
env:
- VERSION=$(echo $TRAVIS_TAG | cut -c 2-10)
before_install: |
if [[ "$TRAVIS_PULL_REQUEST_SLUG" == "" || "$TRAVIS_PULL_REQUEST_SLUG" == "$TRAVIS_REPO_SLUG" ]];then
openssl aes-256-cbc -K $encrypted_f23adc84ec09_key -iv $encrypted_f23adc84ec09_iv -in .travis/secrets.tar.enc -out .travis/secrets.tar -d && \
tar xvf .travis/secrets.tar -C .travis
fi;
script:
- echo "${VERSION}" > VERSION
- php ./bin/console --env=prod cache:warm && php -d phar.readonly=false tools/box.phar compile --config=box.json && openssl sha1 build/phpDocumentor.phar
- echo "Update https://github.com/josegonzalez/homebrew-php/blob/master/Formula/phpdocumentor.rb with the latest version number and the SHA1 that is shown above with the path /get/phpDocumentor-${VERSION}.phar"
deploy:
provider: releases
api_key:
secure: WUchZXQQdIDtVQTYZsQ++2R1y6I+EzBrAACRuc33wAVd0mlqNmu3nb/c1Ou4pTk5JxjyGqm9Siyp9vobhBtzBh/hdXAnbZDWNx2l6R1M9S4R/Z/VbcQ+uIJ/VOoh2KvIOCcyVuFVmsemlVQCuatCRKswKmK/OuyQXy6ppyZMilA=
file:
- "build/phpDocumentor.phar"
- "build/phpDocumentor.phar.pubkey"
skip_cleanup: true
on:
repo: phpDocumentor/phpDocumentor2
tags: true
- stage: release
if: type IN (push)
php: 7.1
env:
- VERSION=$(echo $TRAVIS_TAG | cut -c 2-10)
script:
- echo "${VERSION}" > VERSION
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=$(git describe --tags --exclude="*nightly*" | sed -E "s/\-[a-z0-9]+\-/-nightly-/")
- |
if [ "${TRAVIS_TAG}" == "" ]; then
git tag $GIT_TAG -a -m "Nightly build. Not a stable release. Expect bugs!";
echo "${GIT_TAG}" > VERSION
fi
- php ./bin/console --env=prod cache:warm && php -d phar.readonly=false tools/box.phar compile
deploy:
provider: releases
api_key:
secure: WUchZXQQdIDtVQTYZsQ++2R1y6I+EzBrAACRuc33wAVd0mlqNmu3nb/c1Ou4pTk5JxjyGqm9Siyp9vobhBtzBh/hdXAnbZDWNx2l6R1M9S4R/Z/VbcQ+uIJ/VOoh2KvIOCcyVuFVmsemlVQCuatCRKswKmK/OuyQXy6ppyZMilA=
file:
- "build/phpDocumentor.phar"
- "build/phpDocumentor.phar.pubkey"
skip_cleanup: true
on:
repo: phpDocumentor/phpDocumentor2
tags: false
branch:
- develop
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.phive
- ./docker
notifications:
irc: "irc.freenode.org#phpdocumentor"
slack:
secure: "fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg="
email: