Skip to content

Commit 6359f32

Browse files
authored
Merge pull request #127 from norkunas/travis
Improve travis ?
2 parents 8a4e80b + 63ad69e commit 6359f32

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

.travis.yml

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,53 @@
11
language: php
2-
32
sudo: false
3+
cache:
4+
directories:
5+
- $HOME/.composer/cache/files
6+
- $HOME/symfony-bridge/.phpunit
47

5-
php:
6-
- 5.6
7-
- 7.0
8-
- 7.1
9-
- 7.2
10-
- 7.3
11-
- nightly
8+
env:
9+
global:
10+
- PHPUNIT_FLAGS="-v"
11+
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
1212

1313
matrix:
14+
fast_finish: true
15+
include:
16+
# Test minimum supported dependencies with the latest and oldest PHP version
17+
- php: 5.6
18+
- php: 7.1
19+
- php: 7.2
20+
- php: 7.3
21+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
22+
# Test the latest stable release
23+
- php: 7.1
24+
- php: 7.2
25+
- php: 7.3
26+
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text --coverage-clover=build/coverage.xml"
27+
# Test forcing symfony components version
28+
- php: 5.6
29+
- php: 7.1
30+
env: DEPENDENCIES="dunglas/symfony-lock:^3"
31+
- php: 7.2
32+
- php: 7.3
33+
env: DEPENDENCIES="dunglas/symfony-lock:^4"
34+
# Latest commit to master
35+
- php: 7.3
36+
env: STABILITY="dev"
37+
1438
allow_failures:
15-
- php: nightly
39+
# Dev-master is allowed to fail.
40+
- env: STABILITY="dev"
41+
42+
before_install:
43+
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
44+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
45+
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
1646

1747
install:
18-
- travis_retry composer install --no-interaction --prefer-source
48+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
49+
- ./vendor/bin/simple-phpunit install
50+
51+
script:
52+
- composer validate --strict --no-check-lock
53+
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"symfony/options-resolver": "^3.4|^4.0"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "^5.7",
22-
"php-http/guzzle6-adapter": "^1.1"
21+
"php-http/guzzle6-adapter": "^1.1",
22+
"symfony/phpunit-bridge": "^4.3"
2323
},
2424
"autoload": {
2525
"psr-4": { "OneSignal\\": "src/" }

0 commit comments

Comments
 (0)