Skip to content

Commit a32617e

Browse files
authored
Merge branch 'master' into feature/pcntl-req-check
2 parents 60d0cbd + 81f3033 commit a32617e

File tree

107 files changed

+4375
-2098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+4375
-2098
lines changed

.github/workflows/build.yml

Lines changed: 78 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,104 @@ on: [push, pull_request]
44

55
env:
66
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
7-
PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid
7+
PHPUNIT_EXCLUDE_GROUP: db,wincache,xcache,zenddata
88
XDEBUG_MODE: coverage, develop
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
phpunit:
1216
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
17+
1318
runs-on: ${{ matrix.os }}
14-
services:
15-
mysql:
16-
image: mysql:5.7
17-
env:
18-
MYSQL_ROOT_PASSWORD: root
19-
MYSQL_DATABASE: yiitest
20-
ports:
21-
- 3306:3306
22-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
23-
postgres:
24-
image: postgres:9.6
25-
env:
26-
POSTGRES_USER: postgres
27-
POSTGRES_PASSWORD: postgres
28-
POSTGRES_DB: yiitest
29-
ports:
30-
- 5432:5432
31-
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
19+
3220
strategy:
3321
fail-fast: false
3422
matrix:
35-
os: [ubuntu-latest]
36-
php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
23+
include:
24+
- php: 5.4
25+
coverage: none
26+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
27+
os: ubuntu-latest
28+
- php: 5.5
29+
coverage: none
30+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
31+
os: ubuntu-latest
32+
- php: 5.6
33+
coverage: none
34+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
35+
os: ubuntu-latest
36+
- php: 7.0
37+
coverage: none
38+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
39+
os: ubuntu-latest
40+
- php: 7.1
41+
coverage: none
42+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
43+
os: ubuntu-latest
44+
- php: 7.2
45+
coverage: none
46+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
47+
os: ubuntu-latest
48+
- php: 7.3
49+
coverage: none
50+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
51+
os: ubuntu-latest
52+
- php: 7.4
53+
coverage: xdebug
54+
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
55+
os: ubuntu-latest
56+
- php: 8.0
57+
coverage: none
58+
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
59+
os: ubuntu-latest
60+
- php: 8.1
61+
coverage: none
62+
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
63+
os: ubuntu-latest
64+
- php: 8.2
65+
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
66+
coverage: none
67+
os: ubuntu-latest
3768

3869
steps:
39-
- name: Generate french locale
70+
- name: Generate french locale.
4071
run: sudo locale-gen fr_FR.UTF-8
41-
- name: Checkout
72+
73+
- name: Checkout.
4274
uses: actions/checkout@v3
43-
- name: Install PHP
75+
76+
- name: Install PHP.
4477
uses: shivammathur/setup-php@v2
4578
with:
79+
coverage: ${{ matrix.coverage }}
80+
extensions: ${{ matrix.extensions }}
81+
ini-values: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC', session.save_path="${{ runner.temp }}"
4682
php-version: ${{ matrix.php }}
4783
tools: pecl
48-
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
49-
ini-values: date.timezone='UTC', session.save_path="${{ runner.temp }}"
50-
- name: Install Memcached
84+
85+
- name: Install Memcached.
5186
uses: niden/actions-memcached@v7
52-
- name: Get composer cache directory
53-
id: composer-cache
54-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
55-
- name: Cache composer dependencies
56-
uses: actions/cache@v3
57-
with:
58-
path: ${{ steps.composer-cache.outputs.dir }}
59-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
60-
restore-keys: ${{ runner.os }}-composer-
61-
- name: Install dependencies
87+
88+
- name: Install dependencies.
6289
run: composer update $DEFAULT_COMPOSER_FLAGS
63-
- name: PHP Unit tests
90+
91+
- name: Run tests with PHPUnit.
92+
if: matrix.php < '7.4' || matrix.php >= '8.1'
6493
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
6594

66-
npm:
67-
name: NPM 6 on ubuntu-latest
68-
runs-on: ubuntu-latest
95+
- name: Run tests with PHPUnit.
96+
if: matrix.php == '8.0'
97+
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
6998

70-
steps:
71-
- name: Checkout
72-
uses: actions/checkout@v3
73-
- name: Install PHP
74-
uses: shivammathur/setup-php@v2
75-
with:
76-
php-version: 7.2
77-
ini-values: session.save_path=${{ runner.temp }}
78-
- name: Get composer cache directory
79-
id: composer-cache
80-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
81-
- name: Cache composer dependencies
82-
uses: actions/cache@v3
83-
with:
84-
path: ${{ steps.composer-cache.outputs.dir }}
85-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
86-
restore-keys: ${{ runner.os }}-composer-
87-
- name: Install dependencies
88-
run: composer update $DEFAULT_COMPOSER_FLAGS
89-
- name: Install node.js
90-
uses: actions/setup-node@v1
99+
- name: Run tests with PHPUnit and generate coverage.
100+
if: matrix.php == '7.4'
101+
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --coverage-clover=coverage.xml --colors=always
102+
103+
- name: Upload coverage to Codecov.
104+
if: matrix.php == '7.4'
105+
uses: codecov/codecov-action@v3
91106
with:
92-
node-version: 6
93-
- name: Tests
94-
run: |
95-
npm install
96-
npm test
97-
# env:
98-
# CI: true
107+
file: ./coverage.xml

.github/workflows/ci-mssql.yml

Lines changed: 23 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,31 @@ on:
44

55
name: ci-mssql
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
tests:
913
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
1014

1115
env:
12-
key: cache
16+
EXTENSIONS: pdo, pdo_sqlsrv
17+
XDEBUG_MODE: coverage, develop
1318

1419
runs-on: ubuntu-latest
1520

1621
strategy:
1722
matrix:
1823
include:
19-
- php: 7.0
20-
extensions: pdo, pdo_sqlsrv-5.8.1
21-
mssql: server:2017-latest
22-
- php: 7.1
23-
extensions: pdo, pdo_sqlsrv-5.8.1
24-
mssql: server:2017-latest
25-
- php: 7.2
26-
extensions: pdo, pdo_sqlsrv-5.8.1
27-
mssql: server:2017-latest
28-
- php: 7.3
29-
extensions: pdo, pdo_sqlsrv-5.8.1
30-
mssql: server:2017-latest
3124
- php: 7.4
32-
extensions: pdo, pdo_sqlsrv
33-
mssql: server:2017-latest
34-
- php: 7.4
35-
extensions: pdo, pdo_sqlsrv
36-
mssql: server:2019-latest
37-
- php: 8.0
38-
extensions: pdo, pdo_sqlsrv
3925
mssql: server:2017-latest
4026
- php: 8.0
41-
extensions: pdo, pdo_sqlsrv
4227
mssql: server:2019-latest
28+
- php: 8.1
29+
mssql: server:2019-latest
30+
- php: 8.2
31+
mssql: server:2022-latest
4332

4433
services:
4534
mssql:
@@ -62,42 +51,28 @@ jobs:
6251
- name: Install PHP with extensions
6352
uses: shivammathur/setup-php@v2
6453
with:
65-
php-version: ${{ matrix.php }}
66-
extensions: ${{ matrix.extensions }}
54+
coverage: xdebug
55+
extensions: ${{ env.EXTENSIONS }}
6756
ini-values: date.timezone='UTC'
57+
php-version: ${{ matrix.php }}
6858
tools: composer:v2, pecl
6959

70-
- name: Determine composer cache directory on Linux
71-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
72-
73-
- name: Cache dependencies installed with composer
74-
uses: actions/cache@v3
75-
with:
76-
path: ${{ env.COMPOSER_CACHE_DIR }}
77-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
78-
restore-keys: |
79-
php${{ matrix.php }}-composer-
80-
8160
- name: Update composer
8261
run: composer self-update
8362

8463
- name: Install dependencies with composer
8564
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
8665

87-
- name: Install dependencies with composer php 8.0
88-
if: matrix.php == '8.0'
89-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
66+
- name: Run MSSQL tests with PHPUnit and generate coverage.
67+
if: matrix.php == '7.4'
68+
run: vendor/bin/phpunit --group mssql --coverage-clover=coverage.xml --colors=always
9069

91-
- name: PHP Unit tests for PHP 7.1
92-
run: vendor/bin/phpunit --coverage-clover=coverage.clover --group mssql --colors=always
93-
if: matrix.php == '7.1'
94-
95-
- name: Run tests with phpunit without coverage
70+
- name: Run MSSQL tests with PHPUnit.
71+
if: matrix.php > '7.4'
9672
run: vendor/bin/phpunit --group mssql --colors=always
9773

98-
- name: Code coverage
99-
run: |
100-
wget https://scrutinizer-ci.com/ocular.phar
101-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
102-
if: matrix.php == '7.1'
103-
continue-on-error: true # if is fork
74+
- name: Upload coverage to Codecov.
75+
if: matrix.php == '7.4'
76+
uses: codecov/codecov-action@v3
77+
with:
78+
file: ./coverage.xml

.github/workflows/ci-mysql.yml

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ on:
44

55
name: ci-mysql
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
tests:
9-
name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }}
13+
name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql }}
1014
env:
1115
extensions: curl, intl, pdo, pdo_mysql
12-
key: cache-v1
16+
XDEBUG_MODE: coverage, develop
1317

1418
runs-on: ${{ matrix.os }}
1519

@@ -18,15 +22,19 @@ jobs:
1822
os:
1923
- ubuntu-latest
2024

21-
php-version:
25+
php:
2226
- 7.4
27+
- 8.0
28+
- 8.1
29+
- 8.2
2330

24-
mysql-version:
31+
mysql:
32+
- 5.7
2533
- latest
2634

2735
services:
2836
mysql:
29-
image: mysql:${{ matrix.mysql-version }}
37+
image: mysql:${{ matrix.mysql }}
3038
env:
3139
MYSQL_ROOT_PASSWORD: root
3240
MYSQL_DATABASE: yiitest
@@ -35,46 +43,31 @@ jobs:
3543
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3644

3745
steps:
38-
- name: Checkout
46+
- name: Checkout.
3947
uses: actions/checkout@v3
4048

41-
- name: Setup cache environment
42-
id: cache-env
43-
uses: shivammathur/cache-extensions@v1
44-
with:
45-
php-version: ${{ matrix.php-version }}
46-
extensions: ${{ env.extensions }}
47-
key: ${{ env.key }}
48-
49-
- name: Cache extensions
50-
uses: actions/cache@v3
51-
with:
52-
path: ${{ steps.cache-env.outputs.dir }}
53-
key: ${{ steps.cache-env.outputs.key }}
54-
restore-keys: ${{ steps.cache-env.outputs.key }}
55-
56-
- name: Install PHP with extensions
49+
- name: Install PHP with extensions.
5750
uses: shivammathur/setup-php@v2
5851
with:
59-
php-version: ${{ matrix.php-version }}
60-
extensions: ${{ env.extensions }}
52+
coverage: xdebug
53+
extensions: ${{ env.EXTENSIONS }}
6154
ini-values: date.timezone='UTC'
62-
coverage: pcov
63-
64-
- name: Determine composer cache directory
65-
if: matrix.os == 'ubuntu-latest'
66-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
55+
php-version: ${{ matrix.php }}
56+
tools: composer:v2, pecl
6757

68-
- name: Cache dependencies installed with composer
69-
uses: actions/cache@v1
70-
with:
71-
path: ${{ env.COMPOSER_CACHE_DIR }}
72-
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
73-
restore-keys: |
74-
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
75-
76-
- name: Install dependencies with composer
58+
- name: Install dependencies with composer.
7759
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
7860

79-
- name: Run mysql tests with phpunit
61+
- name: Run MySQL tests with PHPUnit and generate coverage.
62+
if: matrix.php == '7.4'
63+
run: vendor/bin/phpunit --group mysql --coverage-clover=coverage.xml --colors=always
64+
65+
- name: Run MySQL tests with PHPUnit.
66+
if: matrix.php > '7.4'
8067
run: vendor/bin/phpunit --group mysql --colors=always
68+
69+
- name: Upload coverage to Codecov.
70+
if: matrix.php == '7.4'
71+
uses: codecov/codecov-action@v3
72+
with:
73+
file: ./coverage.xml

0 commit comments

Comments
 (0)