generated from glhd/laravel-package-template
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (45 loc) · 1.57 KB
/
phpunit.yml
File metadata and controls
56 lines (45 loc) · 1.57 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
name: PHPUnit
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 14 * * 3' # Run Wednesdays at 2pm EST
jobs:
php-tests:
strategy:
matrix:
dependency-version: [ stable, lowest ]
os: [ ubuntu, windows ]
laravel: [ 11.*, 12.*, 13.* ]
php: [ 8.3, 8.4 ]
runs-on: "${{ matrix.os }}-latest"
timeout-minutes: 10
name: "${{ matrix.os }}: ${{ matrix.php }} / ${{ matrix.laravel }} (${{ matrix.dependency-version }})"
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv, fileinfo
tools: composer:v2
- name: Register composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v5
if: ${{ steps.composer-cache.outputs.dir != '' }}
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer require --no-interaction --prefer-dist --update-with-all-dependencies --prefer-${{ matrix.dependency-version }} "illuminate/support:${{ matrix.laravel }}"
- name: Execute tests
run: vendor/bin/phpunit