Skip to content

Commit 568634e

Browse files
committed
Implement lowest/locked/latest CI strategy
1 parent 56f3a1e commit 568634e

File tree

4 files changed

+2192
-13
lines changed

4 files changed

+2192
-13
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
composer.lock
21
vendor/

.travis.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,60 @@ language: php
55
cache:
66
directories:
77
- $HOME/.composer/cache
8+
- vendor
9+
10+
env:
11+
global:
12+
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
813

914
matrix:
1015
fast_finish: true
1116
include:
12-
- php: 5.5
17+
- php: 5.6
18+
env:
19+
- DEPS=lowest
20+
- php: 5.6
1321
env:
14-
- EXECUTE_CS_CHECK=true
22+
- DEPS=locked
1523
- php: 5.6
1624
env:
17-
- EXECUTE_COVERAGE=true
25+
- DEPS=latest
26+
- php: 7
27+
env:
28+
- DEPS=lowest
29+
- php: 7
30+
env:
31+
- DEPS=locked
32+
- CS_CHECK=true
1833
- php: 7
34+
env:
35+
- DEPS=latest
36+
- php: hhvm
37+
env:
38+
- DEPS=lowest
1939
- php: hhvm
40+
env:
41+
- DEPS=locked
42+
- php: hhvm
43+
env:
44+
- DEPS=latest
2045
allow_failures:
21-
- php: 7
2246
- php: hhvm
2347

2448
notifications:
2549
irc: "irc.freenode.org#apigility-dev"
2650
email: false
2751

2852
before_install:
29-
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
30-
- composer self-update
53+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
54+
- travis_retry composer self-update
3155

3256
install:
33-
- travis_retry composer install --no-interaction --ignore-platform-reqs --prefer-source
57+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
58+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
59+
- travis_retry composer install $COMPOSER_ARGS
60+
- composer show
3461

3562
script:
36-
- ./vendor/bin/phpunit
37-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
63+
- composer test
64+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

composer.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
"source": "https://github.com/zfcampus/zf-api-problem",
1818
"issues": "https://github.com/zfcampus/zf-api-problem/issues"
1919
},
20-
"repositories": [
21-
{ "type": "composer", "url": "https://packages.zendframework.com" }
22-
],
2320
"extra": {
2421
"branch-alias": {
2522
"dev-master": "1.1-dev",
@@ -53,5 +50,14 @@
5350
"psr-4": {
5451
"ZFTest\\ApiProblem\\": "test/"
5552
}
53+
},
54+
"scripts": {
55+
"check": [
56+
"@cs-check",
57+
"@test"
58+
],
59+
"cs-check": "phpcs",
60+
"cs-fix": "phpcbf",
61+
"test": "phpunit"
5662
}
5763
}

0 commit comments

Comments
 (0)