PHPStan 2.0 support #1528
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: Unit Tests Postgres | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
phpunit: | |
name: PHPUnit | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php-version: "8.0" | |
db-image: 'postgres:14' | |
reflector: "pdo-pgsql" | |
mode: "recording" | |
env: | |
DBA_REFLECTOR: ${{ matrix.reflector }} | |
DBA_MODE: ${{ matrix.mode }} | |
DBA_USER: postgres | |
DBA_DATABASE: postgres | |
DBA_PASSWORD: postgres | |
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers | |
services: | |
postgres: | |
image: ${{ matrix.db-image }} | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.client_payload.pull_request.head.ref }} | |
- name: Setup PHP with PDO | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php-version }}" | |
coverage: none | |
- uses: "ramsey/composer-install@v3" | |
with: | |
composer-options: "--prefer-dist --no-progress" | |
- name: Install sqlftw/sqlftw (optional dependency) | |
run: composer require sqlftw/sqlftw --ignore-platform-req=php+ | |
- name: Install doctrine/dbal (optional dependency) | |
run: composer require doctrine/dbal:^3 --ignore-platform-req=php+ | |
- name: Setup Problem Matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install PostgreSQL client | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes postgresql-client | |
- name: Setup PSQL | |
run: psql -h localhost -U postgres < tests/pgsql-schema.sql | |
env: | |
PGPASSWORD: postgres | |
- run: composer phpunit -- --colors=always |