forked from alexlongshaw/EntityAuditBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (84 loc) · 2.92 KB
/
test-platforms.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
name: Test on platforms
on:
push:
branches:
- 1.x
- 2.x
pull_request:
jobs:
test-mysql:
name: PHP ${{ matrix.php-version }} + MySQL + highest
runs-on: ubuntu-latest
continue-on-error: false
env:
DATABASE_URL: mysql://[email protected]:3306/sonata_tests
services:
mysql:
image: mysql:8.0
options: >-
--health-cmd "mysqladmin ping --silent"
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
-e MYSQL_DATABASE=sonata_tests
ports:
- 3306:3306
strategy:
matrix:
php-version:
- '8.1'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2
extensions: zip, mysqli, pdo_mysql
- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v1
with:
dependency-versions: highest
composer-options: --prefer-dist --prefer-stable
- name: Run Tests
run: make test
test-postgres:
name: PHP ${{ matrix.php-version }} + PostgreSQL + highest
runs-on: ubuntu-latest
continue-on-error: false
env:
DATABASE_URL: postgresql://postgres:[email protected]:5432/postgres?serverVersion=13&charset=utf8
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd "pg_isready"
ports:
- 5432:5432
strategy:
matrix:
php-version:
- '8.1'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2
extensions: zip
- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v1
with:
dependency-versions: highest
composer-options: --prefer-dist --prefer-stable
- name: Run Tests
run: make test