Skip to content

Commit 7677e63

Browse files
committed
update ci cfg
1 parent bd3d3db commit 7677e63

File tree

4 files changed

+167
-18
lines changed

4 files changed

+167
-18
lines changed

.scrutinizer.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
before_commands:
2+
- "composer install --no-dev --prefer-source"
3+
4+
checks:
5+
php:
6+
excluded_dependencies:
7+
- phpstan/phpstan
8+
9+
tools:
10+
external_code_coverage:
11+
enabled: true
12+
timeout: 300
13+
filter:
14+
excluded_paths: ["examples", "tests", "vendor"]
15+
php_code_sniffer:
16+
enabled: true
17+
config:
18+
standard: PSR2
19+
filter:
20+
paths: ["src/*", "tests/*"]
21+
excluded_paths: []
22+
php_cpd:
23+
enabled: true
24+
excluded_dirs: ["examples", "tests", "vendor"]
25+
php_cs_fixer:
26+
enabled: true
27+
config:
28+
level: all
29+
filter:
30+
paths: ["src/*", "tests/*"]
31+
php_loc:
32+
enabled: true
33+
excluded_dirs: ["examples", "tests", "vendor"]
34+
php_mess_detector:
35+
enabled: true
36+
config:
37+
ruleset: phpmd.xml.dist
38+
design_rules: { eval_expression: false }
39+
filter:
40+
paths: ["src/*"]
41+
php_pdepend:
42+
enabled: true
43+
excluded_dirs: ["examples", "tests", "vendor"]
44+
php_analyzer:
45+
enabled: true
46+
filter:
47+
paths: ["src/*", "tests/*"]
48+
sensiolabs_security_checker: true

.travis.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
11
language: php
2-
32
php:
4-
- 7.0
53
- 7.1
64
- 7.2
5+
- nightly
6+
sudo: false
7+
8+
env:
79

810
matrix:
11+
fast_finish: true
912
allow_failures:
10-
- php: 7.2
11-
12-
cache:
13-
directories:
14-
- $HOME/.composer/cache
13+
- php: nightly
1514

1615
install:
17-
- composer install --no-interaction
16+
- composer install --no-interaction --prefer-dist --optimize-autoloader
1817

19-
script:
20-
- vendor/bin/phpunit --coverage-clover=coverage.xml -v
18+
jobs:
19+
include:
20+
- stage: test
21+
script:
22+
- vendor/bin/phpunit --no-coverage
2123

22-
after_script:
23-
- |
24-
if [ $TRAVIS_PHP_VERSION = '7.1' ]; then
25-
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;
26-
php coveralls.phar --verbose;
27-
fi
24+
- stage: coverage
25+
php: 7.1
26+
script:
27+
- vendor/bin/phpunit
28+
after_script:
29+
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
30+
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
31+
32+
- stage: lint
33+
php: 7.1
34+
before_script:
35+
- composer create-project symplify/easy-coding-standard temp/ecs
36+
script:
37+
- temp/ecs/bin/ecs check src tests
38+
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
39+
40+
cache:
41+
directories:
42+
- $HOME/.composer/cache/files
2843

2944
notifications:
3045
irc: "irc.freenode.org#phpdocumentor"
46+
slack:
47+
secure: "fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg="
3148
email:
32-
33-
49+
50+

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:\typeresolver
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:\typeresolver
50+
- composer install --no-interaction --prefer-dist --no-progress
51+
52+
test_script:
53+
- cd c:\typeresolver
54+
- vendor/bin/phpunit

easy-coding-standard.neon

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
includes:
2+
- temp/ecs/config/clean-code.neon
3+
- temp/ecs/config/psr2.neon
4+
- temp/ecs/config/common.neon
5+
6+
checkers:
7+
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
8+
spacing: one
9+
10+
parameters:
11+
exclude_checkers:
12+
# from temp/ecs/config/common.neon
13+
- PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer
14+
- PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer
15+
- PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer
16+
# from temp/ecs/config/spaces.neon
17+
- PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer
18+
19+
skip:
20+
# SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff:
21+
# # WIP code
22+
# - src/DocBlock/StandardTagFactory.php
23+
# PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff:
24+
# # WIP code
25+
# - src/DocBlock/StandardTagFactory.php
26+
# PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff:
27+
# - src/DocBlock/Tags/Return_.php
28+
# - src/DocBlock/Tags/Var_.php
29+
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff:
30+
- */tests/**

0 commit comments

Comments
 (0)