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
7 changes: 6 additions & 1 deletion .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
- 'deptrac.yaml'
- '.github/workflows/deptrac.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -39,7 +44,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ inputs['php-version'] }}
tools: composer
extensions: intl, json, mbstring, xml
coverage: none
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
- 'phpunit*'
- '.github/workflows/infection.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.2'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -31,7 +36,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: ${{ inputs['php-version'] }}
tools: infection, phpunit
extensions: intl, json, mbstring, gd, xml, sqlite3
coverage: xdebug
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: Options to phpcpd
required: false
type: string
php-version:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -44,7 +48,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ inputs['php-version'] }}
tools: phpcpd
extensions: dom, mbstring
coverage: none
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
- '**.php'
- '.github/workflows/phpcsfixer.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -24,13 +29,9 @@ permissions:

jobs:
build:
name: PHP ${{ matrix.php-versions }} Coding Standards
name: PHP ${{ inputs['php-version'] }} Coding Standards
runs-on: ubuntu-latest
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.4']

steps:
- name: Checkout
Expand All @@ -39,7 +40,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ inputs['php-version'] }}
extensions: json, tokenizer
coverage: none
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
- 'phpstan*'
- '.github/workflows/phpstan.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -28,13 +33,9 @@ permissions:

jobs:
build:
name: PHP ${{ matrix.php-versions }} Static Analysis
name: PHP ${{ inputs['php-version'] }} Static Analysis
runs-on: ubuntu-latest
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout
Expand All @@ -43,7 +44,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ inputs['php-version'] }}
tools: phpstan, phpunit
extensions: intl, json, mbstring, xml
coverage: none
Expand Down
37 changes: 26 additions & 11 deletions .github/workflows/phpunit-lowest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ on:
- 'phpunit*'
- '.github/workflows/phpunit-lowest.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'
db-platform:
required: false
type: string
default: 'MySQLi'
mysql-version:
required: false
type: string
default: '5.7'
dependencies:
required: false
type: string
default: 'lowest'
coveralls-php:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -29,19 +50,13 @@ permissions:

jobs:
main:
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }} - ${{ matrix.dependencies }}
name: PHP ${{ inputs['php-version'] }} - ${{ inputs['db-platform'] }} - ${{ inputs['dependencies'] }}
runs-on: ubuntu-latest
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
matrix:
php-versions: ['8.1']
db-platforms: ['MySQLi']
mysql-versions: ['5.7']
dependencies: ['lowest']

services:
mysql:
image: mysql:${{ matrix.mysql-versions }}
image: mysql:${{ inputs['mysql-version'] }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
Expand All @@ -59,7 +74,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ inputs['php-version'] }}
tools: composer, phive, phpunit
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3
coverage: xdebug
Expand All @@ -84,11 +99,11 @@ jobs:
composer update ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi
env:
COMPOSER_UPDATE_FLAGS: ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }}
COMPOSER_UPDATE_FLAGS: ${{ inputs['dependencies'] == 'lowest' && '--prefer-lowest' || '' }}

- name: Test with PHPUnit
run: vendor/bin/phpunit --coverage-text --testsuite main
env:
DB: ${{ matrix.db-platforms }}
DB: ${{ inputs['db-platform'] }}
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled
27 changes: 18 additions & 9 deletions .github/workflows/phpunit-no-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ on:
- 'phpunit*'
- '.github/workflows/phpunit-no-db.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'
dependencies:
required: false
type: string
default: 'highest'
coveralls-php:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -29,13 +42,9 @@ permissions:

jobs:
main:
name: PHP ${{ matrix.php-versions }} Unit Tests
name: PHP ${{ inputs['php-version'] }} Unit Tests
runs-on: ubuntu-latest
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
dependencies: ['highest', 'lowest']

steps:
- name: Check disk space
Expand All @@ -47,7 +56,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ inputs['php-version'] }}
tools: composer, phive, phpunit
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3
coverage: xdebug
Expand All @@ -72,15 +81,15 @@ jobs:
composer update ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi
env:
COMPOSER_UPDATE_FLAGS: ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }}
COMPOSER_UPDATE_FLAGS: ${{ inputs['dependencies'] == 'lowest' && '--prefer-lowest' || '' }}

- name: Test with PHPUnit
run: vendor/bin/phpunit --coverage-text --testsuite main
env:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled

- if: matrix.php-versions == '8.1'
- if: ${{ inputs['php-version'] == inputs['coveralls-php'] }}
name: Run Coveralls
continue-on-error: true
run: |
Expand All @@ -89,7 +98,7 @@ jobs:
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }}
COVERALLS_FLAG_NAME: PHP ${{ inputs['php-version'] }}

coveralls:
needs: [main]
Expand Down
60 changes: 29 additions & 31 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ on:
- 'phpunit*'
- '.github/workflows/phpunit.yml'
workflow_call:
inputs:
php-version:
required: false
type: string
default: '8.1'
db-platform:
required: false
type: string
default: 'MySQLi'
mysql-version:
required: false
type: string
default: '8.0'
dependencies:
required: false
type: string
default: 'highest'
coveralls-php:
required: false
type: string
default: '8.1'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -35,36 +56,13 @@ env:

jobs:
main:
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
name: PHP ${{ inputs['php-version'] }} - ${{ inputs['db-platform'] }}
runs-on: ubuntu-22.04
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
db-platforms: ['MySQLi', 'SQLite3']
mysql-versions: ['8.0']
dependencies: ['highest']
include:
# MySQL 5.7
- php-versions: '8.1'
db-platforms: MySQLi
mysql-versions: '5.7'
# Postgre
- php-versions: '8.1'
db-platforms: Postgre
mysql-versions: '8.0'
# SQLSRV
- php-versions: '8.1'
db-platforms: SQLSRV
mysql-versions: '8.0'
# OCI8
- php-versions: '8.1'
db-platforms: OCI8
mysql-versions: '8.0'

services:
mysql:
image: mysql:${{ matrix.mysql-versions }}
image: mysql:${{ inputs['mysql-version'] }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
Expand Down Expand Up @@ -128,7 +126,7 @@ jobs:
swap-storage: true

- name: Create database for MSSQL Server
if: matrix.db-platforms == 'SQLSRV'
if: ${{ inputs['db-platform'] == 'SQLSRV' }}
run: sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test"

- name: Checkout
Expand All @@ -137,7 +135,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ inputs['php-version'] }}
tools: composer, phive, phpunit
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3, sqlsrv, oci8, pgsql
coverage: xdebug
Expand All @@ -162,16 +160,16 @@ jobs:
composer update ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi
env:
COMPOSER_UPDATE_FLAGS: ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }}
COMPOSER_UPDATE_FLAGS: ${{ inputs['dependencies'] == 'lowest' && '--prefer-lowest' || '' }}

- name: Test with PHPUnit
run: vendor/bin/phpunit --coverage-text --testsuite main
env:
DB: ${{ matrix.db-platforms }}
DB: ${{ inputs['db-platform'] }}
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled

- if: matrix.php-versions == '8.1'
- if: ${{ inputs['php-version'] == inputs['coveralls-php'] }}
name: Run Coveralls
continue-on-error: true
run: |
Expand All @@ -180,7 +178,7 @@ jobs:
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
COVERALLS_FLAG_NAME: PHP ${{ inputs['php-version'] }} - ${{ inputs['db-platform'] }}

coveralls:
needs: [main]
Expand Down
Loading