Skip to content

Commit

Permalink
no-issue - CI - add MariaDB
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMellerin committed Nov 24, 2023
1 parent 5a11668 commit dc6e36f
Showing 1 changed file with 57 additions and 46 deletions.
103 changes: 57 additions & 46 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,61 +147,72 @@ jobs:
DBAL_ROOT_USER: "postgres"
DBAL_USER: "postgres"
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/test_db?serverVersion=${{ matrix.postgres-version }}&charset=utf8"
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
run: "vendor/bin/phpunit"

# phpunit-mariadb:
# name: "PHPUnit with MariaDB"
# runs-on: "ubuntu-22.04"
phpunit-mariadb:
name: "PHPUnit with MariaDB"
runs-on: ubuntu-latest
container:
image: ghcr.io/makinacorpus/dbtoolsbundle-ci:main
needs: "phpunit-smoke-tests"

# strategy:
# matrix:
# php-version:
# - "8.1"
# - "8.2"
# - "8.3"
# mariadb-version:
# - "10.6" # LTS (Jul 2026)
# - "10.11" # LTS (Feb 2028)
# - "11.0" # STS (Jun 2024)
# - "11.1" # STS (Aug 2024)
# extension:
# - "mysqli"
# - "pdo_mysql"
strategy:
matrix:
php-version:
- "8.1"
mariadb-version:
- "10.6" # LTS (Jul 2026)
- "10.11" # LTS (Feb 2028)
- "11.0" # STS (Jun 2024)
- "11.1" # STS (Aug 2024)
extension:
- "mysqli"
- "pdo_mysql"

# services:
# mariadb:
# image: "mariadb:${{ matrix.mariadb-version }}"
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_DATABASE: "doctrine_tests"
services:
mariadb:
image: "mariadb:${{ matrix.mariadb-version }}"
env:
MARIADB_ROOT_PASSWORD: "password"
MYSQL_DATABASE: "test_db"

# options: >-
# --health-cmd "mariadb-admin ping --silent || mysqladmin ping --silent"
options: >-
--health-cmd "mariadb-admin ping --silent || mysqladmin ping --silent"
# ports:
# - "3306:3306"
ports:
- "3306:3306"

# steps:
# - name: "Checkout"
# uses: "actions/checkout@v4"
# with:
# fetch-depth: 2
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

# - name: "Install PHP"
# uses: "shivammathur/setup-php@v2"
# with:
# php-version: "${{ matrix.php-version }}"
# coverage: "pcov"
# ini-values: "zend.assertions=1"
# extensions: "${{ matrix.extension }}"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
ini-values: "zend.assertions=1"
extensions: "${{ matrix.extension }}"

# - name: "Install dependencies with Composer"
# uses: "ramsey/composer-install@v2"
# with:
# composer-options: "--ignore-platform-req=php+"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"

# - name: "Run PHPUnit"
# run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
- name: "Run PHPUnit"
env:
DBAL_DRIVER: "${{ matrix.extension }}"
DBAL_DBNAME: "test_db"
DBAL_HOST: "mariadb"
DBAL_PASSWORD: "password"
DBAL_PORT: "3306"
DBAL_ROOT_PASSWORD: "password"
DBAL_ROOT_USER: "root"
DBAL_USER: "root"
DATABASE_URL: "mysql://root:password@mariadb11:3306/test_db"

run: "vendor/bin/phpunit"

# phpunit-mysql:
# name: "PHPUnit with MySQL"
Expand Down

0 comments on commit dc6e36f

Please sign in to comment.