-
Notifications
You must be signed in to change notification settings - Fork 244
99 lines (90 loc) · 3.04 KB
/
tests.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
name: PHP Composer
#whenever master has a PR or is pushed to
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- php-versions: '5.5'
laravel-versions: '5.1.*'
- php-versions: '5.6'
laravel-versions: '5.1.*'
- php-versions: '7.0'
laravel-versions: '5.5.*'
- php-versions: '7.1'
laravel-versions: '^5.5'
- php-versions: '7.2'
laravel-versions: '^5.5'
- php-versions: '7.2'
laravel-versions: '^6.0'
- php-versions: '7.2'
laravel-versions: '^7.0'
- php-versions: '7.3'
laravel-versions: '^6.0'
- php-versions: '7.3'
laravel-versions: '^7.0'
- php-versions: '7.3'
laravel-versions: '^8.0'
- php-versions: '7.4'
laravel-versions: '^6.0'
- php-versions: '7.4'
laravel-versions: '^7.0'
- php-versions: '7.4'
laravel-versions: '^8.0'
- php-versions: '8.0'
laravel-versions: '^7.0'
- php-versions: '8.0'
laravel-versions: '^8.0'
- php-versions: '8.0'
laravel-versions: '^9.0'
- php-versions: '8.1'
laravel-versions: '^8.0'
- php-versions: '8.1'
laravel-versions: '^9.0'
- php-versions: '8.1'
laravel-versions: '^10.0'
- php-versions: '8.2'
laravel-versions: '^9.0'
- php-versions: '8.2'
laravel-versions: '^10.0'
#set the name for each job
name: PHP ${{ matrix.php-versions }} with Laravel ${{ matrix.laravel-versions }}
#set up environment variables used by unit tests
env:
AWS_ACCESS_KEY_ID: foo
AWS_SECRET_ACCESS_KEY: bar
AWS_CSM_ENABLED: false
steps:
#sets up the correct version of PHP with necessary config options
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: memory_limit=4G, phar.readonly=false
#checkout the codebase from github
- name: Checkout codebase
uses: actions/checkout@v3
#require laravel
- name: Require laravel
run: composer require laravel/framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins
#run tests
- name: Run test suite
run: vendor/bin/phpunit
#remove laravel
- name: Remove laravel
run: |
composer remove laravel/framework --no-plugins
rm composer.lock
#require lumen
- name: Require lumen
if: ${{ matrix.laravel-versions != '^10.0' && (matrix.php-versions != '^8.0' && matrix.laravel-versions != '^7.0') }}
run: composer require laravel/lumen-framework:${{ matrix.laravel-versions }} --no-interaction --prefer-dist --no-plugins
#run tests
- name: Run test suite
run: vendor/bin/phpunit