generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 7
70 lines (61 loc) · 1.92 KB
/
unit-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
name: Unit Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
exclude:
# These combinations should work, but there is a problem when testing...
- laravel: 8.*
php: 8.1
- laravel: 8.*
php: 8.2
- laravel: 8.*
php: 8.3
# Laravel 11.x only supports PHP ^8.2
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
# Laravel 10.x only supports PHP ^8.1
- laravel: 10.*
php: 8.0
# Laravel 7.x only supports PHP 7.2-8.0
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
# Laravel 6.x only supports PHP 7.2-8.0
- laravel: 6.*
php: 8.1
- laravel: 6.*
php: 8.2
- laravel: 6.*
php: 8.3
name: L${{ matrix.laravel }} - P${{ matrix.php }} - ${{ matrix.color }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show
- name: Execute tests
run: vendor/bin/phpunit