Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit f9389c5

Browse files
committedNov 26, 2019
draft support for Travis-CI matrixes
1 parent 213733d commit f9389c5

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed
 

‎.travis.yml

+35-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
language: php
22

3-
php:
4-
- 7.2
5-
- 7.1
3+
matrix:
4+
include:
5+
- php: 7.1
6+
env: LARAVEL=55
7+
- php: 7.1
8+
env: LARAVEL=56
9+
- php: 7.1
10+
env: LARAVEL=57
11+
- php: 7.2
12+
env: LARAVEL=55
13+
- php: 7.2
14+
env: LARAVEL=56
15+
- php: 7.2
16+
env: LARAVEL=57
617

718
services:
819
- mysql
@@ -16,7 +27,27 @@ before_script:
1627
- composer install --prefer-source --no-interaction
1728

1829
script:
19-
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
30+
# Packages: Laravel 5.5.x
31+
- if [ "$LARAVEL" = "55" ] ; then composer require "phpunit/phpunit:6.*" --no-update ; fi
32+
- if [ "$LARAVEL" = "55" ] ; then composer require "laravel/framework:5.5.*" --no-update ; fi
33+
- if [ "$LARAVEL" = "55" ] ; then composer require "orchestra/database:3.5.*" --no-update ; fi
34+
- if [ "$LARAVEL" = "55" ] ; then composer require "orchestra/testbench:3.5.*" --no-update ; fi
35+
# Packages: Laravel 5.6.x
36+
- if [ "$LARAVEL" = "56" ] ; then composer require "phpunit/phpunit:7.*" --no-update ; fi
37+
- if [ "$LARAVEL" = "56" ] ; then composer require "laravel/framework:5.6.*" --no-update ; fi
38+
- if [ "$LARAVEL" = "56" ] ; then composer require "orchestra/database:3.6.*" --no-update ; fi
39+
- if [ "$LARAVEL" = "56" ] ; then composer require "orchestra/testbench:3.6.*" --no-update ; fi
40+
# Packages: Laravel 5.7.x
41+
- if [ "$LARAVEL" = "57" ] ; then composer require "phpunit/phpunit:7.*" --no-update ; fi
42+
- if [ "$LARAVEL" = "57" ] ; then composer require "laravel/framework:5.7.*" --no-update ; fi
43+
- if [ "$LARAVEL" = "57" ] ; then composer require "orchestra/database:3.7.x-dev as 3.7" --no-update ; fi
44+
- if [ "$LARAVEL" = "57" ] ; then composer require "orchestra/testbench:3.7.*" --no-update ; fi
45+
# Packages: Update
46+
- composer update --prefer-source --no-interaction
47+
# Tests: Configure
48+
- if [ "$LARAVEL" = "" ] ; then export LOG="build/logs/clover.xml" ; else export LOG="build/logs/clover-$LARAVEL.xml" ; fi
49+
# Tests: Run
50+
- vendor/bin/phpunit --coverage-clover "$LOG"
2051

2152
after_script:
2253
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

0 commit comments

Comments
 (0)