Skip to content

Adapt for changes in db #1780

Adapt for changes in db

Adapt for changes in db #1780

Workflow file for this run

on:
pull_request:
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'
push:
branches: ['master']
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'
name: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }}
env:
COMPOSER_ROOT_VERSION: 1.0.0
EXTENSIONS: pdo, pdo_pgsql
runs-on: ubuntu-latest
strategy:
matrix:
php:
- 8.4
pgsql:
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
include:
- php: 8.1
pgsql: 17
- php: 8.2
pgsql: 17
- php: 8.3
pgsql: 17
services:
postgres:
image: postgres:${{ matrix.pgsql }}
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: yiitest
ports:
- 5432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout.
uses: actions/checkout@v4
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
coverage: pcov
- name: Update composer.
run: composer self-update
- name: Install db.
uses: yiisoft/actions/install-packages@master
with:
packages: >-
['db']
- name: Run tests with phpunit with code coverage.
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations
- name: Upload coverage to Codecov.
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml