Raise min version to PHP 7.3
, check compatibility PHP 8.3
.
#278
Workflow file for this run
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
name: build | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
jobs: | |
phpunit: | |
name: PHP ${{ matrix.php }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
services: | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: yiitest | |
ports: | |
- 5432:5432 | |
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php: ['7.3', '7.4', '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 }} | |
tools: pecl | |
extensions: curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite | |
ini-values: date.timezone='UTC', session.save_path="${{ runner.temp }}" | |
- name: Install dependencies with composer. | |
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | |
- name: Load database data. | |
env: | |
PGHOST: 127.0.0.1 | |
PGUSER: postgres | |
PGDATABASE: yiitest | |
PGPASSWORD: postgres | |
PGPORT: ${{ job.services.postgres.ports['5432'] }} | |
run: | | |
sudo apt update && sudo apt --fix-broken install && sudo apt install -y postgresql-client | |
psql -U postgres yiitest < tests/data/pgsql.sql | |
echo "<?php unset(\$config['databases']['pgsql']['fixture']);" > tests/data/config.local.php | |
- name: Run tests with phpunit. | |
if: matrix.php != '8.1' | |
run: vendor/bin/phpunit --colors=always | |
- name: Run tests with phpunit and generate coverage. | |
if: matrix.php == '8.1' | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always | |
- name: Upload coverage to Codecov. | |
if: matrix.php == '8.1' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml |