Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit fea924b

Browse files
authored
Merge pull request #65 from stefanotorresi/composer-lock
add composer.lock & update travis config
2 parents da7ef15 + 46e1323 commit fea924b

File tree

6 files changed

+1335
-70
lines changed

6 files changed

+1335
-70
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
.*.sw*
77
.*.un~
88
nbproject
9-
109
doc/html/
1110
tmp/
1211
zf-mkdoc-theme/
1312
clover.xml
14-
composer.lock
1513
coveralls-upload.json
1614
phpcs.xml
1715
phpunit.xml

.travis.yml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,47 @@ cache:
1515

1616
env:
1717
global:
18+
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
1819
- TESTS_ZEND_CODE_ANNOTATION_DOCTRINE_SUPPORT=true
19-
- SITE_URL=https://zendframework.github.io/zend-code
20+
- SITE_URL="https://zendframework.github.io/zend-code"
2021
- GH_USER_NAME="Matthew Weier O'Phinney"
21-
22-
- GH_REF=github.com/zendframework/zend-code.git
22+
- GH_USER_EMAIL="[email protected]"
23+
- GH_REF="github.com/zendframework/zend-code.git"
2324
- secure: "qgUppUW+xiQunsc07EvrYK7q9j4ewsYzN2ggxxFGaF694gkZ5V29Tb9W2qCkKEdMo6vE+X65P/lOoJceyavPm39/Ka/0V461qIiYX2ZcBVFI/eeVnpwLmU/E5YHn6fFNbiwFX0o4cJdVyTrSspMTXSuiQy+9bLSevDYmbpknR476nmsF8FRGdG6GMFx0XklF1QkoERSfy+FGlqp3VYOJZ2MH7eLhXQyGBKv471kyfmyyInUMVoDN9R8mjJ4Sxyt2qaQ5661DuWRXLaWEBaNOvfZ4++jJFipPLyqIEcE2GqTl9LH3suIBd0NAfHGgdakMJuBZfW3WA/OQ208qm+++qajnI30cxKiGkFoAR2plK9P5+09JAzbivglpEIEtq9a58/I1ahjy9+4sqJYyfxUC07o+REUleJl/ojO6QQ3JI/UUBbPSa3d78Sw9i8LUmLimiYEYQK9zwO1ZdKwJYCKaiYdYS8H0IwGci9t+MqlrllMG5M6f2HRkF1Ph05sWah8QwsGrJ7yiSiILaDHn7wFNvUiN3uw09W9AotQ0AEBzdM6U6CngDPVWKHI9L1d7+txuOLwGt6j8NKHWlgA1P9rMkeMGn2+46b5AlCkUxg6cVCA8ZLpr3a5WLK2F7qTHACtP9tckEb4G3vQjM79f6Nlpewcuc7p7uHWK5Y4UkojRN+U="
2425

2526
matrix:
2627
include:
27-
- php: 5.5
28+
- php: 5.6
2829
env:
29-
- EXECUTE_CS_CHECK=true
30+
- DEPS=lowest
3031
- php: 5.6
3132
env:
32-
- EXECUTE_TEST_COVERALLS=true
33+
- DEPS=locked
3334
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
3435
- PATH="$HOME/.local/bin:$PATH"
36+
- TEST_COVERAGE=true
37+
- php: 5.6
38+
env:
39+
- DEPS=latest
40+
- php: 7
41+
env:
42+
- DEPS=lowest
3543
- php: 7
36-
- php: hhvm
44+
env:
45+
- DEPS=locked
46+
- CHECK_CS=true
47+
- php: 7
48+
env:
49+
- DEPS=latest
50+
- php: hhvm
51+
env:
52+
- DEPS=lowest
53+
- php: hhvm
54+
env:
55+
- DEPS=locked
56+
- php: hhvm
57+
env:
58+
- DEPS=latest
3759
allow_failures:
3860
- php: hhvm
3961

@@ -42,24 +64,23 @@ notifications:
4264
email: false
4365

4466
before_install:
45-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
46-
- composer self-update
47-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
67+
- travis_retry composer self-update
68+
- if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi
4869

4970
install:
50-
- travis_retry composer install --no-interaction --ignore-platform-reqs
51-
52-
before_script:
53-
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then cp mkdocs.yml mkdocs.yml.orig ; fi
71+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
72+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
73+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS satooshi/php-coveralls:^1.0 ; fi
74+
- travis_retry composer install $COMPOSER_ARGS
75+
- composer show
5476

5577
script:
56-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
57-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
58-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
59-
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
60-
61-
after_success:
62-
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
78+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
79+
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
80+
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then travis_retry curl -sSL https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh | bash ; fi
6381

6482
after_script:
65-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
83+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi
84+
85+
after_success:
86+
- if [[ $DEPLOY_DOCS == "true" ]]; then ./zf-mkdoc-theme/deploy.sh ; fi

composer.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
},
1515
"require": {
16-
"php": "^5.5 || 7.0.0 - 7.0.4 || ^7.0.6",
16+
"php": "^5.6 || 7.0.0 - 7.0.4 || ^7.0.6",
1717
"zendframework/zend-eventmanager": "^2.6 || ^3.0"
1818
},
1919
"require-dev": {
@@ -39,5 +39,16 @@
3939
"psr-4": {
4040
"ZendTest\\Code\\": "test/"
4141
}
42+
},
43+
"scripts": {
44+
"check": [
45+
"@cs-check",
46+
"@test"
47+
],
48+
"upload-coverage": "coveralls -v",
49+
"cs-check": "phpcs",
50+
"cs-fix": "phpcbf",
51+
"test": "phpunit --colors=always",
52+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
4253
}
4354
}

0 commit comments

Comments
 (0)