-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.18 KB
/
tests.yml
File metadata and controls
84 lines (68 loc) · 2.18 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
name: Tests
on:
pull_request:
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
push:
branches: [main]
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
jobs:
sqlite:
name: SQLite / PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.4', '8.5']
laravel: ['12', '13']
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
extensions: redis
- uses: actions/cache@v5
with:
path: vendor
key: composer-test-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-test-${{ matrix.php }}-${{ matrix.laravel }}-
- run: composer require illuminate/support:^${{ matrix.laravel }}.0 --no-update
- run: composer update --no-interaction
- run: docker compose up -d --wait valkey
- run: vendor/bin/pest --exclude-group=benchmark --coverage --min=90
- run: docker compose down -v
pgsql:
name: PostgreSQL / PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}
needs: sqlite
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.4', '8.5']
laravel: ['12', '13']
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: redis, pdo_pgsql
- uses: actions/cache@v5
with:
path: vendor
key: composer-db-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-db-${{ matrix.php }}-${{ matrix.laravel }}-
- run: composer require illuminate/support:^${{ matrix.laravel }}.0 --no-update
- run: composer update --no-interaction
- run: docker compose up -d --wait postgres valkey
- run: DB_CONNECTION=pgsql vendor/bin/pest --exclude-group=benchmark
- run: docker compose down -v