-
Notifications
You must be signed in to change notification settings - Fork 11
120 lines (103 loc) · 4.22 KB
/
master.yml
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
name: Test Master
on:
push:
branches:
- master
jobs:
version-latest:
name: Latest version Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.1', '8.2' ]
laravel-versions: [ '^10.0' ]
steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
php_version: ${{ matrix.php-versions }}
laravel_version: ${{ matrix.laravel-versions }}
phpunit_args: --group unit
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins
- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu
- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo
# Note for PHP 8.0.
# For PHP 8.0, we need to force Laravel to use Symfony 6.0 instead of 6.1. Because some syntax support is missing.
#
# The error:
# PHP Parse error: syntax error, unexpected token ")" in path\vendor\symfony\finder\Finder.php on line 588
#
# The reason: https://github.com/symfony/symfony/discussions/46540#discussioncomment-2861896
version-4-0:
name: Version 4 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.0', '8.1' ]
laravel-versions: [ '^9.0' ]
steps:
- id: composer-flag
name: Set Composer Flag based on PHP Version input
uses: haya14busa/action-cond@v1
with:
cond: ${{ matrix.php-versions == '8.0' }}
if_true: '--ignore-platform-req=php+'
if_false: ''
- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
php_version: ${{ matrix.php-versions }}
laravel_version: ${{ matrix.laravel-versions }}
phpunit_args: --group unit
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins ${{ steps.composer-flag.outputs.value }}
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins ${{ steps.composer-flag.outputs.value }}
branch: 4.0.0
- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu
- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo
version-3:
name: Version 3.0.0 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '7.4' ]
laravel-versions: [ '5.7.*', '^6.0', '^7.0', '^8.0' ]
steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
php_version: ${{ matrix.php-versions }}
laravel_version: ${{ matrix.laravel-versions }}
phpunit_args: --group unit
branch: 3.0.0
- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu
version-2:
name: Version 2.2 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '7.3', '7.4' ]
laravel-versions: [ '5.6.*' ]
steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
php_version: ${{ matrix.php-versions }}
laravel_version: ${{ matrix.laravel-versions }}
phpunit_args: --group unit
branch: 2.2
- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu