Skip to content

Commit 9ff23ac

Browse files
authored
Merge pull request #145 from ashnazg/ci
update travis build; add appveyor
2 parents 3bf31c9 + 264e587 commit 9ff23ac

File tree

6 files changed

+181
-26
lines changed

6 files changed

+181
-26
lines changed

.gitignore

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
# IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make
2+
# it easy to contribute
13
.idea
2-
vendor
3-
/build
4-
/temp
4+
/nbproject/private/
5+
.buildpath
6+
.project
7+
.settings
8+
9+
# Build folder and vendor folder are generated code; no need to version this
10+
build/*
11+
temp/*
12+
vendor/*
13+
composer.phar
14+
15+
# By default the phpunit.xml.dist is provided; you can override this using a local config file
16+
phpunit.xml

.scrutinizer.yml

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

.travis.yml

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
11
language: php
2-
32
php:
43
- 7.1
54
- 7.2
5+
- nightly
6+
sudo: false
67

7-
matrix:
8-
include:
9-
- php: 7.1
10-
env: ECS=true
11-
- php: 7.1
12-
env: PHPSTAN=true
8+
env:
139

14-
cache:
15-
directories:
16-
- $HOME/.composer/cache
10+
matrix:
11+
fast_finish: true
12+
allow_failures:
13+
- php: nightly
1714

1815
install:
19-
- composer install --no-interaction
20-
- if [[ $ECS != "" ]]; then composer create-project symplify/easy-coding-standard temp/ecs; fi
16+
- composer install --no-interaction --prefer-dist --optimize-autoloader
2117

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
18+
jobs:
19+
include:
20+
- stage: test
21+
script:
22+
- vendor/bin/phpunit --no-coverage
23+
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
2639

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

3144
notifications:
3245
irc: "irc.freenode.org#phpdocumentor"
46+
slack:
47+
secure: "fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg="
3348
email:
34-
35-
36-
49+
50+

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock)
1+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2+
[![Travis Status](https://travis-ci.org/phpDocumentor/ReflectionDocBlock.svg?branch=master)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock)
3+
[![Appveyor Status](https://ci.appveyor.com/api/projects/status/03a9euxrcse7orgu/branch/master?svg=true)](https://ci.appveyor.com/project/phpDocumentor/reflectiondocblock/branch/master)
4+
[![Code Quality](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)
5+
[![Code Coverage](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)
6+
[![Coverage Status](https://coveralls.io/repos/github/phpDocumentor/ReflectionDocBlock/badge.svg?branch=master)](https://coveralls.io/github/phpDocumentor/ReflectionDocBlock?branch=master)
7+
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
8+
9+
10+
The ReflectionDocBlock Component
211
================================
312

413
Introduction

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

phpmd.xml.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<ruleset
3+
name="ProxyManager rules"
4+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
7+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
8+
>
9+
<rule ref="rulesets/codesize.xml"/>
10+
<rule ref="rulesets/unusedcode.xml"/>
11+
<rule ref="rulesets/design.xml">
12+
<!-- eval is needed to generate runtime classes -->
13+
<exclude name="EvalExpression"/>
14+
</rule>
15+
<rule ref="rulesets/naming.xml">
16+
<exclude name="LongVariable"/>
17+
</rule>
18+
<rule ref="rulesets/naming.xml/LongVariable">
19+
<properties>
20+
<property name="minimum">40</property>
21+
</properties>
22+
</rule>
23+
</ruleset>

0 commit comments

Comments
 (0)