forked from tpetry/laravel-query-expressions
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.26 KB
/
Copy pathtests-maria.yml
File metadata and controls
83 lines (73 loc) · 2.26 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
name: Testing (MariaDB)
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
test:
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["${{ inputs.version }}"]
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10.*, 11.*, 12.*]
stability: [prefer-lowest, prefer-stable]
exclude:
# Laravel 12.x only supports PHP ^8.2
- laravel: 12.*
php: 8.1
# Laravel 11.x only supports PHP ^8.2
- laravel: 11.*
php: 8.1
# Laravel 11.x required MariaDB 10.10+
- laravel: 11.*
version: 10.3
- laravel: 11.*
version: 10.4
- laravel: 11.*
version: 10.5
- laravel: 11.*
version: 10.6
- laravel: 11.*
version: 10.7
- laravel: 11.*
version: 10.8
- laravel: 11.*
version: 10.9
services:
database:
image: mariadb:${{ matrix.version }}
options: --health-cmd="healthcheck.sh --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo
coverage: none
- 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 -D
- name: Execute tests
run: vendor/bin/pest
env:
DB_CONNECTION: ${{ matrix.laravel == '10.*' && 'mysql' || 'mariadb' }}
DB_DATABASE: mysql
DB_USERNAME: root