Skip to content

Commit 17333cc

Browse files
committed
update travis build; add appveyor
1 parent c8a9168 commit 17333cc

File tree

2 files changed

+89
-20
lines changed

2 files changed

+89
-20
lines changed

.travis.yml

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: php
2-
3-
php:
4-
- 7.1
5-
- 7.2
2+
php: [7.1, 7.2, nightly ]
3+
sudo: false
64

75
matrix:
86
include:
@@ -11,26 +9,43 @@ matrix:
119
- php: 7.1
1210
env: PHPSTAN=true
1311

14-
cache:
15-
directories:
16-
- $HOME/.composer/cache
12+
env:
13+
global:
14+
- VERSION=$(echo $TRAVIS_TAG | cut -c 2-10)
1715

1816
install:
19-
- composer install --no-interaction
20-
- if [[ $ECS != "" ]]; then composer create-project symplify/easy-coding-standard temp/ecs; fi
17+
- composer install --no-interaction --prefer-dist -o
18+
- if [[ $ECS != "" ]]; then composer create-project symplify/easy-coding-standard temp/ecs; fi
19+
20+
jobs:
21+
include:
22+
- stage: Test
23+
script:
24+
- vendor/bin/phpunit
25+
- if [[ $ECS != "" ]]; then temp/ecs/bin/ecs check src tests; fi
26+
- if [[ $PHPSTAN != "" ]]; then vendor/bin/phpstan analyse src --level max --configuration phpstan.neon; fi
27+
28+
- stage: Coverage
29+
php: 7.1
30+
script:
31+
- vendor/bin/phpunit
32+
after_script:
33+
- wget https://scrutinizer-ci.com/ocular.phar
34+
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
35+
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;
36+
- php coveralls.phar --verbose;
2137

22-
script:
23-
- vendor/bin/phpunit --coverage-clover=coverage.xml -v
24-
- if [[ $ECS != "" ]]; then temp/ecs/bin/ecs check src tests; fi
25-
- if [[ $PHPSTAN != "" ]]; then vendor/bin/phpstan analyse src --level max --configuration phpstan.neon; fi
38+
allow_failures:
39+
- php: nightly
2640

27-
after_script:
28-
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;
29-
- php coveralls.phar --verbose;
41+
cache:
42+
directories:
43+
- $HOME/.composer/cache/files
3044

3145
notifications:
32-
irc: "irc.freenode.org#phpdocumentor"
46+
irc: irc.freenode.org#phpdocumentor
47+
slack:
48+
secure: fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg=
3349
email:
34-
35-
36-
50+
51+

appveyor.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
build: false
2+
clone_folder: c:\reflectiondocblock
3+
max_jobs: 3
4+
platform: x86
5+
pull_requests:
6+
do_not_increment_build_number: true
7+
version: '{build}.{branch}'
8+
skip_tags: true
9+
branches:
10+
only:
11+
- master
12+
13+
environment:
14+
matrix:
15+
- PHP_VERSION: '7.1.13'
16+
VC_VERSION: 'VC14'
17+
- PHP_VERSION: '7.2.1'
18+
VC_VERSION: 'VC15'
19+
matrix:
20+
fast_finish: false
21+
22+
cache:
23+
- c:\php -> appveyor.yml
24+
- '%LOCALAPPDATA%\Composer\files'
25+
26+
init:
27+
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
28+
29+
install:
30+
- IF NOT EXIST c:\php mkdir c:\php
31+
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
32+
- cd c:\php\%PHP_VERSION%
33+
- IF NOT EXIST php-installed.txt appveyor DownloadFile http://windows.php.net/downloads/releases/php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip
34+
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip -y >nul
35+
- IF NOT EXIST php-installed.txt del /Q *.zip
36+
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
37+
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
38+
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
39+
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
40+
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
41+
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
42+
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
43+
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
44+
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
45+
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
46+
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
47+
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
48+
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
49+
- cd c:\reflectiondocblock
50+
- composer install --no-interaction --prefer-dist --no-progress
51+
52+
test_script:
53+
- cd c:\reflectiondocblock
54+
- vendor/bin/phpunit

0 commit comments

Comments
 (0)