Skip to content

Fix false positive with unnamed placeholders (#628) #1264

Fix false positive with unnamed placeholders (#628)

Fix false positive with unnamed placeholders (#628) #1264

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@v2"
with:
composer-options: "--prefer-dist --no-progress"
- name: Install sqlftw/sqlftw (optional dependency)
run: composer require sqlftw/sqlftw --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2' && matrix.php-version != '7.3'}}"
- name: Install doctrine/dbal (optional dependency)
run: composer require doctrine/dbal --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2'}}"
- 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