Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
447 changes: 46 additions & 401 deletions .github/workflows/continuous-integration.yml

Large diffs are not rendered by default.

113 changes: 112 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
fail-fast: true

jobs:
phpunit-mariadb:
phpunit-mariadb-devel:
name: "PHPUnit with MariaDB"
runs-on: "ubuntu-24.04"

Expand Down Expand Up @@ -70,3 +70,114 @@ jobs:
type: "stream"
topic: "CI - Doctrine/DBAL"
content: "There was an error running Doctrine on MariaDB:${{ matrix.mariadb-version }} - URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}."

phpunit-sqlite:
name: PHPUnit with SQLite
uses: ./.github/workflows/phpunit-sqlite.yml
with:
os: ${{ matrix.os }}
php-version: ${{ matrix.php-version }}
extension: ${{ matrix.extension }}
dependency-versions: ${{ matrix.dependency-versions }}

strategy:
matrix:
os:
- ubuntu-24.04
php-version:
- '8.5'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this use the nightly keyword to reduce maintenance work for that workflow ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the same, yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the difference is that nightly will automatically mean PHP 8.6 after the release of PHP 8.5.0 (it always refers to the master branch of PHP).

Actually, 8.5 currently installs the nightly PHP version as 8.5 is not released yet: https://github.com/shivammathur/setup-php?tab=readme-ov-file#tada-php-support

to me, nightly is exactly the intent we want in this nightly.yml job, to avoid having to remember to update it every year.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my understanding. Using nightly sounds good. It's more expressive and requires less maintenance.

extension:
- pdo_sqlite
- sqlite3
dependency-versions:
- highest

phpunit-mariadb:
name: PHPUnit with MariaDB
uses: ./.github/workflows/phpunit-mariadb.yml
with:
php-version: ${{ matrix.php-version }}
mariadb-version: ${{ matrix.mariadb-version }}
extension: ${{ matrix.extension }}

strategy:
matrix:
php-version:
- '8.5'
mariadb-version:
- '11.4'
extension:
- mysqli
- pdo_mysql

phpunit-mysql:
name: PHPUnit with MySQL
uses: ./.github/workflows/phpunit-mysql.yml
with:
php-version: ${{ matrix.php-version }}
mysql-version: ${{ matrix.mysql-version }}
extension: ${{ matrix.extension }}

strategy:
matrix:
php-version:
- '8.5'
mysql-version:
- '9.1'
extension:
- mysqli
- pdo_mysql

phpunit-sqlserver:
name: PHPUnit with SQL Server
uses: ./.github/workflows/phpunit-sqlserver.yml
with:
php-version: ${{ matrix.php-version }}
extension: ${{ matrix.extension }}
collation: ${{ matrix.collation }}

strategy:
matrix:
php-version:
- '8.5'
extension:
- sqlsrv
- pdo_sqlsrv
collation:
- Latin1_General_100_CI_AS_SC_UTF8

phpunit-oracle:
name: PHPUnit with Oracle
uses: ./.github/workflows/phpunit-oracle.yml
with:
php-version: ${{ matrix.php-version }}
oracle-version: ${{ matrix.oracle-version }}
extension: ${{ matrix.extension }}

strategy:
matrix:
php-version:
- '8.5'
oracle-version:
- '23'
extension:
- oci8
- pdo_oci

phpunit-postgres:
name: PHPUnit with PostgreSQL
uses: ./.github/workflows/phpunit-postgres.yml
with:
php-version: ${{ matrix.php-version }}
postgres-version: ${{ matrix.postgres-version }}
extension: ${{ matrix.extension }}

strategy:
matrix:
php-version:
- '8.5'
postgres-version:
- '17'
extension:
- pgsql
- pdo_pgsql
67 changes: 67 additions & 0 deletions .github/workflows/phpunit-db2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: PHPUnit with Db2

on:
workflow_call:
inputs:
php-version:
required: true
type: string

jobs:
phpunit-db2:
runs-on: ubuntu-24.04

services:
db2:
image: icr.io/db2_community/db2:11.5.8.0
ports:
- '50000:50000'
env:
DB2INSTANCE: db2inst1
DB2INST1_PASSWORD: Doctrine2018
LICENSE: accept
DBNAME: doctrine
options: >-
--health-cmd "su - ${DB2INSTANCE} -c \"db2 -t CONNECT TO ${DBNAME};\""
--health-interval 30s
--health-timeout 10s
--health-retries 5
--privileged

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install IBM DB2 CLI driver
working-directory: /tmp
run: |
wget https://github.com/ibmdb/db2drivers/raw/refs/heads/main/clidriver/v11.5.9/linuxx64_odbc_cli.tar.gz
tar xf linuxx64_odbc_cli.tar.gz
rm linuxx64_odbc_cli.tar.gz

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: ibm_db2
coverage: pcov
ini-values: zend.assertions=1
env:
IBM_DB2_CONFIGURE_OPTS: '--with-IBM_DB2=/tmp/clidriver'

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

- name: Create temporary tablespace
run: docker exec "${{ job.services.db2.id }}" su - db2inst1 -c "db2 -t CONNECT TO doctrine; db2 -t CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K"

- name: Run PHPUnit
run: vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml

- name: Upload coverage file
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-php-${{ inputs.php-version }}.coverage
path: coverage.xml
55 changes: 55 additions & 0 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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

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@v4

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

- 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@v4
with:
name: ${{ github.job }}-${{ inputs.mariadb-version }}-php-${{ inputs.php-version }}-${{ inputs.extension }}.coverage
path: coverage.xml
63 changes: 63 additions & 0 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: PHPUnit with MySQL

on:
workflow_call:
inputs:
php-version:
required: true
type: string
mysql-version:
required: true
type: string
extension:
required: true
type: string
config-file-suffix:
required: false
type: string
default: ''

jobs:
phpunit-mysql:
runs-on: ubuntu-24.04

services:
mysql:
image: mysql:${{ inputs.mysql-version }}
ports:
- '3306:3306'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: doctrine_tests
options: >-
--health-cmd "mysqladmin ping --silent"

steps:
- name: Checkout
uses: actions/checkout@v4

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

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

- name: Copy TLS-related files
run: docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/ca.pem" . && docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/client-cert.pem" . && docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/client-key.pem" .
if: ${{ endsWith(inputs.config-file-suffix, 'tls') }}

- 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@v4
with:
name: ${{ github.job }}-${{ inputs.mysql-version }}-php-${{ inputs.php-version }}-${{ inputs.extension }}${{ inputs.config-file-suffix }}.coverage
path: coverage.xml
57 changes: 57 additions & 0 deletions .github/workflows/phpunit-oracle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: PHPUnit with Oracle

on:
workflow_call:
inputs:
php-version:
required: true
type: string
oracle-version:
required: true
type: string
extension:
required: true
type: string

jobs:
phpunit-oracle:
runs-on: ubuntu-24.04

services:
oracle:
image: gvenzl/oracle-${{ inputs.oracle-version < 23 && 'xe' || 'free' }}:${{ inputs.oracle-version }}
ports:
- '1521:1521'
env:
ORACLE_PASSWORD: oracle
options: >-
--health-cmd healthcheck.sh
--health-interval 20s
--health-timeout 10s
--health-retries 10

steps:
- name: Checkout
uses: actions/checkout@v4

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

- 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.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml

- name: Upload coverage file
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ inputs.oracle-version }}-php-${{ inputs.php-version }}-${{ inputs.extension }}.coverage
path: coverage.xml
Loading