Skip to content
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

Use dockerized PHP on Travis #27

Merged
merged 1 commit into from Jun 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
69 changes: 34 additions & 35 deletions .travis.yml
@@ -1,80 +1,79 @@
language: php
dist: trusty
sudo: false
dist: xenial

matrix:
include:
- php: 7.1
env:
- env:
- PHP_VERSION=7.1
- LARAVEL_VERSION=5.5.*
- SYMFONY_VERSION=^3.0
- PHPUNIT_VERSION=^6.5
- php: 7.1
env:
- env:
- PHP_VERSION=7.1
- LARAVEL_VERSION=5.6.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.1
env:
- env:
- PHP_VERSION=7.1
- LARAVEL_VERSION=5.7.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.1
env:
- env:
- PHP_VERSION=7.1
- LARAVEL_VERSION=5.8.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.2
env:
- env:
- PHP_VERSION=7.2
- LARAVEL_VERSION=5.5.*
- SYMFONY_VERSION=^3.0
- PHPUNIT_VERSION=^6.5
- php: 7.2
env:
- env:
- PHP_VERSION=7.2
- LARAVEL_VERSION=5.6.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.2
env:
- env:
- PHP_VERSION=7.2
- LARAVEL_VERSION=5.7.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.2
env:
- env:
- PHP_VERSION=7.2
- LARAVEL_VERSION=5.8.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^8.0
- php: 7.3
env:
- env:
- PHP_VERSION=7.3
- LARAVEL_VERSION=5.5.*
- SYMFONY_VERSION=^3.0
- PHPUNIT_VERSION=^6.5
- php: 7.3
env:
- env:
- PHP_VERSION=7.3
- LARAVEL_VERSION=5.6.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.3
env:
- env:
- PHP_VERSION=7.3
- LARAVEL_VERSION=5.7.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^7.5
- php: 7.3
env:
- env:
- PHP_VERSION=7.3
- LARAVEL_VERSION=5.8.*
- SYMFONY_VERSION=^4.0
- PHPUNIT_VERSION=^8.0

before_install:
- travis_retry docker pull registry.gitlab.com/grahamcampbell/php:$PHP_VERSION
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "laravel/framework:${LARAVEL_VERSION}" --no-update -n
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "symfony/lts:${SYMFONY_VERSION}" --no-update -n
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update -n

install:
- composer require "laravel/framework:${LARAVEL_VERSION}" --no-update -n
- composer require "symfony/lts:${SYMFONY_VERSION}" --no-update -n
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update -n
- travis_retry composer install --no-suggest --prefer-dist -n -o
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION install --no-suggest --prefer-dist -n -o

script:
- if [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then vendor/bin/phpunit; fi
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
- docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:$PHP_VERSION --coverage-clover build/logs/clover.xml

after_script:
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
- travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint ocular registry.gitlab.com/grahamcampbell/php:$PHP_VERSION code-coverage:upload --format=php-clover build/logs/clover.xml