-
Notifications
You must be signed in to change notification settings - Fork 50
54 lines (45 loc) · 1.71 KB
/
pest.yml
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
name: Tests
on: [ push, pull_request ]
jobs:
test:
name: Pest - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - DB ${{ matrix.db }} ${{ matrix.dependency-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.3, 8.2, 8.1 ]
laravel: [ 10.* ]
db: [ 'mysql:8.0', 'mysql:5.7', 'mariadb:10.9', 'postgis/postgis:16-3.4' ]
dependency-version: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: ^8.0
services:
db:
image: ${{ matrix.db }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_eloquent_spatial_test
POSTGRES_DB: laravel_eloquent_spatial_test
POSTGRES_PORT: 3306
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 3306
options: ${{ (contains(matrix.db, 'postgis') && '--health-cmd="pg_isready" || '--health-cmd="mysqladmin ping" }} --health-interval=10s --health-timeout=5s --health-retries=3'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
env:
DB_PORT: ${{ job.services.db.ports['3306'] }}
DB_DRIVER: ${{ contains(matrix.db, 'postgis') && 'pgsql' || 'mysql' }}
run: vendor/bin/pest