Skip to content

Instantly share code, notes, and snippets.

@sandervanhooft
Created January 3, 2019 17:57
Show Gist options
  • Save sandervanhooft/e1837caafa78d9922a109198beac2a08 to your computer and use it in GitHub Desktop.
Save sandervanhooft/e1837caafa78d9922a109198beac2a08 to your computer and use it in GitHub Desktop.
Check your Laravel package's framework version compatibility with Travis
language: php
sudo: false
php:
- 7.1
- 7.2
- 7.3
- nightly
env:
global:
- COVERAGE=0
matrix:
- LARAVEL='5.5.*' TESTBENCH='3.5.*'
- LARAVEL='5.6.*' TESTBENCH='3.6.*'
- LARAVEL='5.7.*' TESTBENCH='3.7.*'
cache:
directories:
- "$HOME/.composer/cache"
matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: 7.3
env: COVERAGE=1 LARAVEL='5.7.*' TESTBENCH='3.7.*'
exclude:
- php: 7.3
env: LARAVEL='5.7.*' TESTBENCH='3.7.*'
before_script:
- composer config discard-changes true
before_install:
- travis_retry composer self-update
- travis_retry composer require "illuminate/support:${LARAVEL}" "illuminate/database:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update
install:
- travis_retry composer install --prefer-dist --no-interaction --no-suggest
script:
- if [[ $COVERAGE = '0' ]]; then vendor/bin/phpunit; fi
- if [[ $COVERAGE = '1' ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi
after_script:
- if [[ $COVERAGE = '1' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi
@sandervanhooft
Copy link
Author

First inspiration came from TJ Miller's blog post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment