Repository navigation
75 lines (66 loc) · 2.32 KB
/
Copy pathtests.yml
File metadata and controls
75 lines (66 loc) · 2.32 KB
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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
test:
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
laravel: ["10.*", "11.*", "12.*", "13.*"]
include:
- laravel: "10.*"
testbench: "8.*"
- laravel: "11.*"
testbench: "9.*"
- laravel: "12.*"
testbench: "10.*"
- laravel: "13.*"
testbench: "11.*"
exclude:
# Laravel 11 and 12 require PHP 8.2+
- php: "8.1"
laravel: "11.*"
- php: "8.1"
laravel: "12.*"
# Laravel 13 requires PHP 8.3+
- php: "8.1"
laravel: "13.*"
- php: "8.2"
laravel: "13.*"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
# The committed lock file and the platform pin in composer.json target the
# lowest supported stack (PHP 8.1 / Laravel 10). Drop the pin and resolve
# fresh so each job actually tests its own Laravel version.
#
# --no-security-blocking: end-of-life Laravel releases (10.x, 11.x) carry
# unpatched advisories, which Composer refuses to install by default. That
# only matters for applications; here we just need the framework to test
# against.
- name: Install dependencies
run: |
composer config --unset platform.php
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update
composer require --dev "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-security-blocking
- name: Run linting
run: composer lint
- name: Run tests
run: composer test