-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise min version to
PHP 7.3
, check compatibility PHP 8.3
.
- Loading branch information
1 parent
5d02376
commit e8eca0c
Showing
18 changed files
with
139 additions
and
168 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,77 +1,86 @@ | ||
on: | ||
- pull_request | ||
- push | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'psalm.xml' | ||
|
||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'psalm.xml' | ||
|
||
name: build | ||
|
||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
env: | ||
extensions: pdo, pdo_mysql | ||
key: cache-v1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-18.04 | ||
|
||
php: | ||
- "5.4" | ||
- "5.5" | ||
- "5.6" | ||
- "7.0" | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
ini-values: date.timezone='UTC' | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer php < 8.0 | ||
if: matrix.php != '8.0' | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Install dependencies with composer php 8.0 | ||
if: matrix.php == '8.0' | ||
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Setup source database | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;' | ||
mysql -D yiitest -uroot -proot < tests/data/source.sql | ||
- name: Install sphinx | ||
run: cd tests/data/actions && sh sphinx-setup.sh | ||
|
||
- name: Run tests with phpunit | ||
if: matrix.php != '7.4' | ||
run: vendor/bin/phpunit --colors=always | ||
|
||
- name: Run tests with phpunit | ||
if: matrix.php == '7.4' | ||
run: vendor/bin/phpunit --coverage-clover=clover.xml --colors=always | ||
|
||
- name: Upload code coverage scrutinizer | ||
if: matrix.php == '7.4' | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover | ||
tests: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
env: | ||
extensions: pdo, pdo_mysql | ||
key: cache-v1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
- 8.2 | ||
- 8.3 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
ini-values: date.timezone='UTC' | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer. | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Setup source database | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;' | ||
mysql -D yiitest -uroot -proot < tests/data/source.sql | ||
- name: Install sphinx | ||
run: cd tests/data/actions && sh sphinx-setup.sh | ||
|
||
- name: Run tests with phpunit | ||
if: matrix.php != '8.1' | ||
run: vendor/bin/phpunit --colors=always | ||
|
||
- name: Run tests with phpunit | ||
if: matrix.php == '8.1' | ||
run: vendor/bin/phpunit --coverage-clover=coverage.xml--colors=always | ||
|
||
- name: Upload coverage to Codecov. | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.