forked from doctrine/dbal
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.67 KB
/
phpunit-mariadb.yml
File metadata and controls
61 lines (53 loc) · 1.67 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
name: PHPUnit with MariaDB
on:
workflow_call:
inputs:
php-version:
required: true
type: string
mariadb-version:
required: true
type: string
extension:
required: true
type: string
config-file-suffix:
required: false
type: string
default: ''
jobs:
phpunit-mariadb:
runs-on: ubuntu-24.04
services:
mariadb:
image: mariadb:${{ inputs.mariadb-version }}
ports:
- '3306:3306'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: doctrine_tests
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized || mysqladmin ping --protocol tcp --silent"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: ${{ inputs.extension }}
coverage: pcov
ini-values: zend.assertions=1
env:
fail-fast: true
- name: Install dependencies with Composer
uses: ramsey/composer-install@v3
with:
composer-options: '--ignore-platform-req=php+'
- name: Run PHPUnit
run: vendor/bin/phpunit -c ci/github/phpunit/${{ inputs.extension }}${{ inputs.config-file-suffix }}.xml --coverage-clover=coverage.xml
- name: Upload coverage file
uses: actions/upload-artifact@v5
with:
name: ${{ github.job }}-${{ inputs.mariadb-version }}-php-${{ inputs.php-version }}-${{ inputs.extension }}${{ inputs.config-file-suffix }}.coverage
path: coverage.xml