Skip to content

Commit

Permalink
Merge pull request #127 from ashnazg/ci2
Browse files Browse the repository at this point in the history
add more typing
  • Loading branch information
ashnazg authored Jun 15, 2018
2 parents 208cd45 + 784c95f commit b7584ea
Show file tree
Hide file tree
Showing 86 changed files with 1,225 additions and 3,470 deletions.
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make
# it easy to contribute
.idea
vendor
/build/
/nbproject/private/
.buildpath
.project
.settings

# Build folder and vendor folder are generated code; no need to version this
build/
tools/
temp/
vendor/
*.phar

# By default the phpunit.xml.dist is provided; you can override this using a local config file
phpunit.xml
29 changes: 14 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: php
php:
- 7.1
- 7.2
- nightly
php: [ 7.1, 7.2, nightly ]
sudo: false

env:
Expand All @@ -13,33 +10,35 @@ matrix:
- php: nightly

install:
- composer install --no-interaction --prefer-dist --optimize-autoloader
- 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
- travis_retry wget --no-verbose https://phar.io/releases/phive.phar

script:
- /home/travis/.composer/vendor/bin/phpunit --no-coverage

jobs:
include:
- stage: test
script:
- vendor/bin/phpunit --no-coverage

- stage: coverage
php: 7.1
script:
- vendor/bin/phpunit
- /home/travis/.composer/vendor/bin/phpunit
after_script:
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
- 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
before_script:
- composer create-project symplify/easy-coding-standard temp/ecs
- travis_retry php phive.phar --no-progress install --trust-gpg-keys 8E730BA25823D8B5 phpstan
script:
- temp/ecs/bin/ecs check src tests
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
- ./tools/phpstan analyse src --level max --configuration phpstan.neon
- composer create-project symplify/easy-coding-standard temp/ecs ^3 && temp/ecs/bin/ecs check src tests

cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.phive

notifications:
irc: "irc.freenode.org#phpdocumentor"
Expand Down
51 changes: 25 additions & 26 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ skip_tags: true
branches:
only:
- develop
- master

environment:
matrix:
- PHP_VERSION: '7.1.13'
VC_VERSION: 'VC14'
- PHP_VERSION: '7.2.1'
VC_VERSION: 'VC15'
- php_ver_target: 7.1
- php_ver_target: 7.2
matrix:
fast_finish: false

Expand All @@ -25,31 +22,33 @@ cache:
- '%LOCALAPPDATA%\Composer\files'

init:
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- SET ANSICON=121x90 (121x90)


install:
- IF NOT EXIST c:\php mkdir c:\php
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
- cd c:\php\%PHP_VERSION%
- IF NOT EXIST php-installed.txt appveyor DownloadFile http://windows.php.net/downloads/releases/php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip -y >nul
- IF NOT EXIST php-installed.txt del /Q *.zip
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
- IF EXIST c:\tools\php (SET PHP=0)
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- cd c:\tools\php
- IF %PHP%==1 copy /Y php.ini-development php.ini
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- IF %PHP%==1 echo zend.assertions=1 >> php.ini
- IF %PHP%==1 echo assert.exception=On >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd c:\reflection
- composer install --no-interaction --prefer-dist --no-progress
- composer global require phpunit/phpunit ^6
- composer global config bin-dir --absolute

test_script:
- cd c:\reflection
- vendor/bin/phpunit --no-coverage
- c:\Users\appveyor\AppData\Roaming\Composer\vendor\bin\phpunit --no-coverage
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@
]
}
},
"minimum-stability": "alpha",
"require": {
"php": ">=7.1",
"psr/log": "~1.0",
"nikic/php-parser": "^3.0",
"phpdocumentor/reflection-docblock": "^4.1",
"phpdocumentor/reflection-common": "^1.0@dev"
"phpdocumentor/reflection-docblock": "^5"
},
"require-dev": {
"mockery/mockery": "~1.0",
"mikey179/vfsStream": "~1.2",
"squizlabs/php_codesniffer": "^2.5",
"phpunit/phpunit": "~6.5",
"phpstan/phpstan": "^0.9.0"
"mikey179/vfsStream": "~1.2"
},
"extra": {
"branch-alias": {
Expand Down
Loading

0 comments on commit b7584ea

Please sign in to comment.