Skip to content

Commit 92fc744

Browse files
committed
new testing format
1 parent 8b0a021 commit 92fc744

File tree

3 files changed

+57
-87
lines changed

3 files changed

+57
-87
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.travis.yml

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -6,75 +6,18 @@ php:
66
- 5.5
77
- 5.6
88
- 7.0
9-
- hhvm
109

1110
matrix:
1211
fast_finish: true
13-
allow_failures:
14-
- php: 7.0
15-
- php: hhvm
1612

1713
before_script:
18-
# Composer
19-
- composer self-update
20-
- composer update
21-
- composer validate
22-
23-
# install testing tools
24-
- composer require phpunit/phpunit:^4.8
25-
26-
# install report tools
27-
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then
28-
composer require
29-
satooshi/php-coveralls:*
30-
squizlabs/php_codesniffer:*
31-
sebastian/phpcpd:*
32-
phploc/phploc:*
33-
phpmd/phpmd:^2.2
34-
pdepend/pdepend:^2.1
35-
;
36-
fi;'
37-
38-
# Dirs
39-
- mkdir -p build/cov
40-
- mkdir -p build/logs
41-
- mkdir -p build/phpunit
42-
- mkdir -p build/pdepend
43-
44-
# Update env
45-
- phpenv rehash
14+
- composer update-all
4615

4716
script:
48-
# PHPUnit tests
49-
- php vendor/bin/phpunit --configuration phpunit.xml.dist;
50-
51-
# Check PHP Code Standarts
52-
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then
53-
mkdir -p build/misc;
54-
git clone --branch=master https://github.com/JBZoo/Misc.git build/misc;
55-
php vendor/bin/phpcs ./src --standard=build/misc/phpcs/JBZoo/ruleset.xml --report=full;
56-
php vendor/bin/phpmd ./src text ./build/misc/phpmd/jbzoo.xml --verbose;
57-
php vendor/bin/phpcpd ./src --no-interaction --verbose;
58-
fi;'
17+
- composer test
5918

6019
after_script:
61-
# Send to coveralls
62-
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then
63-
php vendor/bin/coveralls --verbose;
64-
fi;'
65-
66-
# Show code statistic
67-
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then
68-
php vendor/bin/phploc ./src --no-interaction --verbose;
69-
fi;'
70-
71-
# Build pdepend stats
72-
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then
73-
php vendor/bin/pdepend
74-
--summary-xml=build/pdepend/summary.xml
75-
--jdepend-chart=build/pdepend/jdepend.svg
76-
--overview-pyramid=build/pdepend/pyramid.svg ./src;
77-
fi;'
20+
- composer coveralls
7821

7922
notifications:
80-
slack: jbzoo:RPyzxVQZPuPhgvm1Q6fDvK3C
23+
slack: jbzoo:lKYRTvAF36tRDfKTOK5zhFh9

composer.json

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,65 @@
11
{
2-
"name": "jbzoo/utils",
3-
"type": "library",
4-
"description": "A collection of useful PHP functions, mini classes and snippets that you need or could use every day.",
5-
"license": "MIT",
6-
"minimum-stability": "dev",
7-
"keywords": ["php", "helpers", "helper", "utility", "utils", "collection"],
8-
"authors": [
2+
"name" : "jbzoo/utils",
3+
"type" : "library",
4+
"description" : "A collection of useful PHP functions, mini classes and snippets that you need or could use every day.",
5+
"license" : "MIT",
6+
"minimum-stability" : "stable",
7+
"keywords" : ["php", "helpers", "helper", "utility", "utils", "collection"],
8+
"authors" : [
99
{
10-
"name": "SmetDenis",
11-
"email": "[email protected]",
12-
"role": "lead"
10+
"name" : "SmetDenis",
11+
"email" : "[email protected]",
12+
"role" : "lead"
1313
},
1414
{
15-
"name": "Brandon Wamboldt",
16-
"email": "[email protected]"
15+
"name" : "Brandon Wamboldt",
16+
"email" : "[email protected]"
1717
}
1818
],
19-
"require": {
20-
"php": ">=5.3.10",
21-
"ext-mbstring": "*"
19+
"require" : {
20+
"php" : ">=5.3.10",
21+
"ext-mbstring" : "*"
2222
},
23-
"require-dev": {
24-
"jbzoo/phpunit": "^1.0"
23+
"require-dev" : {
24+
"jbzoo/phpunit" : "^1.0"
2525
},
26-
"autoload": {
27-
"psr-4": {
28-
"JBZoo\\Utils\\": "src"
26+
"autoload" : {
27+
"psr-4" : {
28+
"JBZoo\\Utils\\" : "src"
2929
}
3030
},
31-
"extra": {
32-
"branch-alias": {
33-
"dev-master": "1.x-dev"
31+
"extra" : {
32+
"branch-alias" : {
33+
"dev-master" : "1.x-dev"
3434
}
35-
},
36-
"support": {
37-
"issues": "https://github.com/JBZoo/Utils/issues"
35+
},
36+
"config" : {
37+
"optimize-autoloader" : true
38+
},
39+
"scripts" : {
40+
"test" : [
41+
"@manifest",
42+
"@autoload",
43+
"@phpunit",
44+
"@phpmd",
45+
"@phpcs",
46+
"@phpcpd",
47+
"@phploc"
48+
],
49+
"update-all" : [
50+
"composer self-update",
51+
"composer update"
52+
],
53+
"manifest" : "composer validate",
54+
"autoload" : "composer dump-autoload --optimize --no-scripts",
55+
"phpunit" : "php ./vendor/phpunit/phpunit/phpunit --configuration ./phpunit.xml.dist",
56+
"phpmd" : "php ./vendor/phpmd/phpmd/src/bin/phpmd ./src text ./vendor/jbzoo/misc/phpmd/jbzoo.xml --verbose",
57+
"phpcs" : "php ./vendor/squizlabs/php_codesniffer/scripts/phpcs ./src --standard=./vendor/jbzoo/misc/phpcs/JBZoo/ruleset.xml --report=full",
58+
"phpcpd" : "php ./vendor/sebastian/phpcpd/phpcpd ./src --verbose",
59+
"phploc" : "php ./vendor/phploc/phploc/phploc ./src --verbose",
60+
"coveralls" : "php ./vendor/satooshi/php-coveralls/bin/coveralls --verbose"
61+
},
62+
"support" : {
63+
"issues" : "https://github.com/JBZoo/Utils/issues"
3864
}
3965
}

0 commit comments

Comments
 (0)