-
-
Notifications
You must be signed in to change notification settings - Fork 189
100 lines (82 loc) · 3.48 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- release/**
jobs:
phpunit:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [ "8.2", "8.1", "8.0", "7.4", "7.3", "7.2" ]
packages:
# All versions below should be test on PHP ^7.1 (Sentry SDK requirement) and PHP < 8.0 (PHPUnit requirement)
- { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
# All versions below only support PHP ^7.3 (Laravel requirement)
- { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }
# All versions below only support PHP ^8.0 (Laravel requirement)
- { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
# All versions below only support PHP ^8.1 (Laravel requirement)
- { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
exclude:
- php: "7.2"
packages: { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }
- php: "7.2"
packages: { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
- php: "7.2"
packages: { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
- php: "7.3"
packages: { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
- php: "7.3"
packages: { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
- php: "7.4"
packages: { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
- php: "7.4"
packages: { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
- php: "8.0"
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- php: "8.0"
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
- php: "8.0"
packages: { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
- php: "8.1"
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- php: "8.1"
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
- php: "8.2"
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- php: "8.2"
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
name: phpunit (PHP:${{ matrix.php }}, Laravel:${{ matrix.packages.laravel }})
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2
- name: Install Composer dependencies
run: |
# No need for this package to run phpunit and it conflicts with older Laravel versions
composer remove friendsofphp/php-cs-fixer --dev --no-interaction --no-update
# Require the correct versions we want to run phpunit for
composer require \
"laravel/framework:${{ matrix.packages.laravel }}" \
"illuminate/support:${{ matrix.packages.laravel }}" \
"phpunit/phpunit:${{ matrix.packages.phpunit }}" \
"orchestra/testbench:${{ matrix.packages.testbench }}" \
--no-interaction --no-update
# Actually run the composer installation
composer install --no-interaction --prefer-dist --no-progress
- name: Run phpunit
run: vendor/bin/phpunit