-
-
Notifications
You must be signed in to change notification settings - Fork 189
151 lines (121 loc) · 5.04 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
pull_request:
push:
branches:
- master
- release/**
permissions:
contents: read
jobs:
phpunit:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [ "8.3", "8.2", "8.1" ]
packages:
# All versions below only support PHP ^8.1 (Laravel requirement)
- { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
name: phpunit (PHP:${{ matrix.php }}, Laravel:${{ matrix.packages.laravel }})
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: composer:v2
- name: Install Composer dependencies
run: |
# friendsofphp/php-cs-fixer: 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: composer test:ci
- name: Upload code coverage
uses: codecov/codecov-action@v3
phpunit-legacy:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [ "8.3", "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.* }
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.3"
packages: { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
- php: "7.4"
packages: { laravel: ^9.0, testbench: ^7.0, phpunit: 9.5.* }
- 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.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.* }
- php: "8.3"
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- php: "8.3"
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
- php: "8.3"
packages: { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }
name: phpunit (PHP:${{ matrix.php }}, Laravel:${{ matrix.packages.laravel }})
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: composer:v2
- name: Install Composer dependencies
run: |
# friendsofphp/php-cs-fixer: No need for this package to run phpunit and it conflicts with older Laravel versions
# laravel/folio: Only supported on PHP 8.1 + Laravel 10.0 and above
composer remove friendsofphp/php-cs-fixer laravel/folio --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: composer test:ci
- name: Upload code coverage
uses: codecov/codecov-action@v3