Skip to content

Travis improvements #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
Copy link
Contributor

@kelunik kelunik Feb 6, 2017

Choose a reason for hiding this comment

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

+ nightly maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe something we can add in another PR since it would probably introduce allow_failures also.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, allow_failures is a good idea for nightly.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we have a consensus here yet. Do we really want to add every single future version for all components?

Other than that, LGTM 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd say yes. Since this is a core component, i think we should run the tests against as much versions as possible.

But i agree that this change should have probably been introduced in another PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we have a consensus here yet. Do we really want to add every single future version for all components?

Have re-read this now: I think it makes sense for this component. If this makes sense for all components is arguable.

Copy link
Member

Choose a reason for hiding this comment

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

Personally I would prefer testing all versions we support to ensure we don't run into weird issues. We also might want to use the new cron feature to schedule builds, but that only makes sense with nightly tbh.

- hhvm

install: ./travis-init.sh
sudo: false

addons:
apt:
packages:
- libevent-dev # Used by 'event' and 'libevent' PHP extensions

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

install:
- ./travis-init.sh
- composer install

script:
- ./vendor/bin/phpunit --coverage-text
11 changes: 4 additions & 7 deletions travis-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ set -o pipefail
if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
"$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then

# install "libevent" (used by 'event' and 'libevent' PHP extensions)
sudo apt-get install -y libevent-dev

# install 'event' PHP extension
echo "yes" | pecl install event

# install 'libevent' PHP extension (does not support php 7)
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
if [[ "$TRAVIS_PHP_VERSION" != "7.0" &&
"$TRAVIS_PHP_VERSION" != "7.1" ]]; then
curl http://pecl.php.net/get/libevent-0.1.0.tgz | tar -xz
pushd libevent-0.1.0
phpize
Expand All @@ -24,7 +22,8 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
fi

# install 'libev' PHP extension (does not support php 7)
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
if [[ "$TRAVIS_PHP_VERSION" != "7.0" &&
"$TRAVIS_PHP_VERSION" != "7.1" ]]; then
git clone --recursive https://github.com/m4rw3r/php-libev
pushd php-libev
phpize
Expand All @@ -36,5 +35,3 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
fi

fi

composer install --dev --prefer-source