Skip to content

Raise min version to PHP 7.3, check compatibility PHP 8.3. #276

Raise min version to PHP 7.3, check compatibility PHP 8.3.

Raise min version to PHP 7.3, check compatibility PHP 8.3. #276

Workflow file for this run

name: build
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
push:
branches: ['master']
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: apc, 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