-
Notifications
You must be signed in to change notification settings - Fork 19
95 lines (80 loc) · 3.69 KB
/
Copy pathtests.yml
File metadata and controls
95 lines (80 loc) · 3.69 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: tests
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
# Laravel 10 (testbench 8)
- { php: '8.1', laravel: '10.*', testbench: '8.*', os: ubuntu-latest }
- { php: '8.2', laravel: '10.*', testbench: '8.*', os: ubuntu-latest }
- { php: '8.3', laravel: '10.*', testbench: '8.*', os: ubuntu-latest }
# Laravel 11 (testbench 9)
- { php: '8.2', laravel: '11.*', testbench: '9.*', os: ubuntu-latest }
- { php: '8.3', laravel: '11.*', testbench: '9.*', os: ubuntu-latest }
- { php: '8.4', laravel: '11.*', testbench: '9.*', os: ubuntu-latest }
# Laravel 12 (testbench 10)
- { php: '8.2', laravel: '12.*', testbench: '10.*', os: ubuntu-latest }
- { php: '8.3', laravel: '12.*', testbench: '10.*', os: ubuntu-latest }
- { php: '8.4', laravel: '12.*', testbench: '10.*', os: ubuntu-latest }
# Laravel 13 (testbench 11, PHP 8.3+). statamic/cms 6 allows ^13.0,
# so this is a version real downstream users are already on.
- { php: '8.3', laravel: '13.*', testbench: '11.*', os: ubuntu-latest }
- { php: '8.4', laravel: '13.*', testbench: '11.*', os: ubuntu-latest }
# Keep an eye on the other host we claim to work on
- { php: '8.4', laravel: '12.*', testbench: '10.*', os: macos-latest }
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
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, gd
coverage: none
ini-values: memory_limit=-1, error_reporting=E_ALL
tools: composer:v2
- name: Determine composer cache directory
id: composer-cache
run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ matrix.os }}-php${{ matrix.php }}-laravel${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-${{ matrix.os }}-php${{ matrix.php }}-laravel${{ matrix.laravel }}-
- name: Allow installing EOL Laravel branches
# Laravel 10 and 11 are past security support, so every release in those
# branches carries an open advisory and Composer 2.9+ declines to install
# them at all. This is a compatibility matrix rather than a deployment,
# and plenty of applications are still on those versions, so we want to
# know whether Archetype works there. Laravel 12 installs unmodified.
if: matrix.laravel != '12.*'
run: composer config policy.advisories.block false
- name: Install dependencies
run: |
composer require --dev --no-update --no-interaction \
"laravel/framework:${{ matrix.laravel }}" \
"orchestra/testbench:${{ matrix.testbench }}"
composer update --prefer-dist --no-interaction --no-progress
- name: Run tests
run: vendor/bin/pest
static-analysis:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none
tools: composer:v2
- run: composer update --prefer-dist --no-interaction --no-progress
- run: vendor/bin/phpstan analyse --no-progress