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
40 changes: 23 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
language: php
sudo: false

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: COMPOSER_FLAGS='--prefer-lowest'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be simpler to just add an env block later? e.g.

env:
  matrix:
    - COMPOSER_FLAGS="--prefer-lowest"
    - COMPOSER_FLAGS=""

Keeps the list of flags and versions distinct?

- 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

- php: 5.5
env: COMPOSER_FLAGS='--prefer-lowest'
- php: 5.5
- php: 5.6
env: COMPOSER_FLAGS='--prefer-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

- php: 7.0
env: COMPOSER_FLAGS='--prefer-lowest'
- php: 7.0
- php: 7.1
env: COMPOSER_FLAGS='--prefer-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: PHPUNIT_FLAGS='--coverage-text'
- php: hhvm
env: COMPOSER_FLAGS='--prefer-lowest'
- php: hhvm
fast_finish: true
allow_failures:
- php: 7.0
- php: hhvm
- php: hhvm-nightly

cache:
directories:
- $HOME/.composer/cache

before_install:
- travis_retry composer self-update

before_script:
- travis_retry composer install --no-interaction
- composer update --no-interaction --prefer-dist $COMPOSER_FLAGS
Copy link
Member

Choose a reason for hiding this comment

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

I would add --no-suggest as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make a sense


script:
- vendor/bin/phpunit --coverage-text
- vendor/bin/behat
- vendor/bin/phpunit $PHPUNIT_FLAGS
- vendor/bin/behat -vv
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should put it in verbose mode, however we could do -f progress --stop-on-failure and add a --stop-on-failure for PHPUnit as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-f progress - good idea. Verbose can be helpful for debugging without running on local machine.
--stop-on-failure? I think is better to get all issues in one build.

Copy link
Member

Choose a reason for hiding this comment

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

both non verbose + progress + fail fast are for fast builds detecting as early as possible if things pass or not. Figuring out why should be done locally, and for issues where it's hard to reproduce locally the user can always change the verbosity.