Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PHP 8 support; dropped Travis and Coveralls; use Github Actions…
… from now on (#145) * travis: added PHP nightly (8.0) to jobs * travis file: fixed some warnings; removed logging in phpunit.xml * added coveralls as dependency to composer; run coverage only on 1 job before this change, each phpunit run generated a coverage report, which is time consuming and not neccessary. now it should be faster because the report is only generated once. extended composer.json with script section for commands run in Travis. * travis: allow failures for PHP:nightly * travis: added missing composer update call * travis: added missing DB and DB_ADAPTER constants to coverage entries * added a third job to complete coverage analysis (for cache enabled) * composer: removed version constraint for PHP CS fixer * simplified Docker setup * only CLI, no Apache webserver anymore * default is PHP 8.0 * corrected outdated test db name * docker/docker-compose.yml-dist: updated db > environment > MYSQL_DATABASE * travis.yml: Dont allow failures anymore, when running PHP 8 * introducing github workflows: first steps * removed coveralls dependency * removed personal path in docker-compose.yml-dist * workflow: added DB install and init script; fixed PHPUnit path * fixed path to install-and-init-db.sh * named workflow by DB name+ver; removed travis.yml; adaptions * allow usage of PORT and HOST in db config * fixed DB_PORT usage * checko $_ENV in test run * more output, less actions * try to get DB_PORT from $_SERVER * fixed failing test in mysqliAdapterTest it fails because it didnt use the dynamic port from DB_PORT yet. * mysql-5.7.yml: extended to test for PHP 7.2 - 8.0 * added workflows for MariaDB 10.1 - 10.5
- Loading branch information
Showing
23 changed files
with
563 additions
and
305 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: MariaDB 10.1 Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
name: | | ||
MariaDB 10.1 Tests - PHP ${{ matrix.php-versions }} | ||
${{ matrix.DB_ADAPTER }} | ||
${{ matrix.DB_PDO_PROTOCOL }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# if one of the matrix-entries break, all entries getting canceled. | ||
fail-fast: true | ||
matrix: | ||
include: | ||
# PHP 7.2 | ||
- php-versions: 7.2 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.3 | ||
- php-versions: 7.3 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.4 | ||
- php-versions: 7.4 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 8.0 | ||
- php-versions: 8.0 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
|
||
services: | ||
testdb: | ||
image: mariadb:10.1 | ||
env: | ||
MYSQL_ROOT_PASSWORD: Pass123 | ||
MYSQL_DATABASE: arc2_test | ||
MYSQL_ALLOW_EMPTY_PASSWORD: false | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: xdebug | ||
ini-values: memory_limit=1G | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Tests | ||
run: | | ||
vendor/bin/phpunit ${{ matrix.COVERAGE_FLAGS }} | ||
env: | ||
DB_PORT: ${{ job.services.testdb.ports[3306] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: MariaDB 10.2 Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
name: | | ||
MariaDB 10.2 Tests - PHP ${{ matrix.php-versions }} | ||
${{ matrix.DB_ADAPTER }} | ||
${{ matrix.DB_PDO_PROTOCOL }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# if one of the matrix-entries break, all entries getting canceled. | ||
fail-fast: true | ||
matrix: | ||
include: | ||
# PHP 7.2 | ||
- php-versions: 7.2 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.3 | ||
- php-versions: 7.3 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.4 | ||
- php-versions: 7.4 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 8.0 | ||
- php-versions: 8.0 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
|
||
services: | ||
testdb: | ||
image: mariadb:10.2 | ||
env: | ||
MYSQL_ROOT_PASSWORD: Pass123 | ||
MYSQL_DATABASE: arc2_test | ||
MYSQL_ALLOW_EMPTY_PASSWORD: false | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: xdebug | ||
ini-values: memory_limit=1G | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Tests | ||
run: | | ||
vendor/bin/phpunit ${{ matrix.COVERAGE_FLAGS }} | ||
env: | ||
DB_PORT: ${{ job.services.testdb.ports[3306] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: MariaDB 10.3 Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
name: | | ||
MariaDB 10.3 Tests - PHP ${{ matrix.php-versions }} | ||
${{ matrix.DB_ADAPTER }} | ||
${{ matrix.DB_PDO_PROTOCOL }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# if one of the matrix-entries break, all entries getting canceled. | ||
fail-fast: true | ||
matrix: | ||
include: | ||
# PHP 7.2 | ||
- php-versions: 7.2 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.3 | ||
- php-versions: 7.3 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.4 | ||
- php-versions: 7.4 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 8.0 | ||
- php-versions: 8.0 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
|
||
services: | ||
testdb: | ||
image: mariadb:10.3 | ||
env: | ||
MYSQL_ROOT_PASSWORD: Pass123 | ||
MYSQL_DATABASE: arc2_test | ||
MYSQL_ALLOW_EMPTY_PASSWORD: false | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: xdebug | ||
ini-values: memory_limit=1G | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Tests | ||
run: | | ||
vendor/bin/phpunit ${{ matrix.COVERAGE_FLAGS }} | ||
env: | ||
DB_PORT: ${{ job.services.testdb.ports[3306] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: MariaDB 10.4 Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
name: | | ||
MariaDB 10.4 Tests - PHP ${{ matrix.php-versions }} | ||
${{ matrix.DB_ADAPTER }} | ||
${{ matrix.DB_PDO_PROTOCOL }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# if one of the matrix-entries break, all entries getting canceled. | ||
fail-fast: true | ||
matrix: | ||
include: | ||
# PHP 7.2 | ||
- php-versions: 7.2 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.2 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.3 | ||
- php-versions: 7.3 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.3 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 7.4 | ||
- php-versions: 7.4 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 7.4 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
# PHP 8.0 | ||
- php-versions: 8.0 | ||
DB_ADAPTER: mysqli | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
- php-versions: 8.0 | ||
DB_ADAPTER: pdo | ||
DB_PDO_PROTOCOL: mysql | ||
CACHE_ENABLED: true | ||
|
||
services: | ||
testdb: | ||
image: mariadb:10.4 | ||
env: | ||
MYSQL_ROOT_PASSWORD: Pass123 | ||
MYSQL_DATABASE: arc2_test | ||
MYSQL_ALLOW_EMPTY_PASSWORD: false | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: xdebug | ||
ini-values: memory_limit=1G | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Tests | ||
run: | | ||
vendor/bin/phpunit ${{ matrix.COVERAGE_FLAGS }} | ||
env: | ||
DB_PORT: ${{ job.services.testdb.ports[3306] }} |
Oops, something went wrong.