Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Improve Travis matrix #207

Merged
merged 14 commits into from
Apr 21, 2017
47 changes: 35 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
language: php
sudo: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also no part of the goal of this PR, can be removed as well


php:
- 7.0
- 5.6
- 5.5
- 5.4
- hhvm
- hhvm-nightly

matrix:
include:
- php: 5.4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per #226, we can remove the EOL php versions 5.3 to 5.5.

env: DEPS=lowest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMPOSER_FLAGS='--prefer-lowest'

- php: 5.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can skip the flags here as it's the default behaviour

env: DEPS=latest
- php: 5.5
env: DEPS=lowest
- php: 5.5
env: DEPS=latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubling the number of tests looks a bit too much to me. Having a test for the two extrema plus one for each version is enough I think

- php: 5.6
env: DEPS=lowest
- php: 5.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

versions should be strings

env: DEPS=latest
- php: 7.0
env: DEPS=lowest
- php: 7.0
env: DEPS=latest
- php: 7.1
env: DEPS=lowest
- php: 7.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're missing a nightly build that should be allowed to fail

env:
- DEPS=latest
- TEST_COVERAGE=true
- php: hhvm
env: DEPS=lowest
- php: hhvm
env: DEPS=latest
- php: hhvm-nightly
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HHVM nightly is no longer supported on TravisCI - travis-ci/travis-ci#3788, so it should be removed

env: DEPS=lowest
- php: hhvm-nightly
env: DEPS=latest
fast_finish: true
allow_failures:
- php: 7.0
- php: hhvm
- php: hhvm-nightly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no hhvm-nightly build now :)


branches:
only:
- master
Expand All @@ -28,8 +50,9 @@ before_install:
- travis_retry composer self-update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer necessary, although it's not related to this PR I think you can take the opportunity to remove it


before_script:
- travis_retry composer install --no-interaction
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update --no-interaction --prefer-source ; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With my first comment, this [the two added lines] can be simplified to composer update --no-interaction --prefer-source $COMPOSER_FLAGS

- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --no-interaction --prefer-source --prefer-lowest ; fi

script:
- vendor/bin/phpunit --coverage-text
- if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/phpunit --coverage-text ; else vendor/bin/phpunit ; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if [ -n "$TEST_COVERAGE" ]; then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single brackets are also enough AFAIK

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about introducing $PHPUNIT_FLAGS? This way we can remove if from this statement.

- vendor/bin/behat