-
Notifications
You must be signed in to change notification settings - Fork 10
84 lines (71 loc) · 2.97 KB
/
run-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
name: Run Tests
on: [fork, pull_request, push, workflow_dispatch]
jobs:
tests:
name: PHP ${{ matrix.php-version }} - Laravel ${{ matrix.laravel-version }} - ${{ matrix.dependency-version }}
runs-on: ubuntu-latest
strategy:
# Enable all tests to run to ease finding multiple issues at once
fail-fast: false
matrix:
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
laravel-version: ['^7.0', '^8.79', '^9.33', '^10.0', '^11.0']
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php-version: '7.3'
laravel-version: '^9.33'
- php-version: '7.3'
laravel-version: '^10.0'
- php-version: '7.3'
laravel-version: '^11.0'
- php-version: '7.4'
laravel-version: '^9.33'
- php-version: '7.4'
laravel-version: '^10.0'
- php-version: '7.4'
laravel-version: '^11.0'
- php-version: '8.0'
laravel-version: '^10.0'
- php-version: '8.0'
laravel-version: '^11.0'
- php-version: '8.1'
laravel-version: '^7.0'
- php-version: '8.1'
laravel-version: '^11.0'
- php-version: '8.2'
laravel-version: '^7.0'
- php-version: '8.2'
laravel-version: '^8.79'
- php-version: '8.3'
laravel-version: '^7.0'
- php-version: '8.3'
laravel-version: '^8.79'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: intl
ini-values: memory_limit=-1
php-version: ${{ matrix.php-version }}
- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
- name: Update composer.json for the build
run: composer require --no-interaction --no-update "illuminate/support:${{ matrix.laravel-version }}"
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-version }}-${{ matrix.dependency-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-version }}-${{ matrix.dependency-version }}-composer-
- name: Install dependencies with composer
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Setup Problem Matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run tests with phpunit/phpunit
run: vendor/bin/phpunit