Skip to content

tests with postgres #391

tests with postgres

tests with postgres #391

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- release/*
pull_request:
workflow_dispatch:
env:
MYSQL_DB_OPTIONS: "--health-cmd=\"mysqladmin ping\" --health-interval=10s --health-timeout=5s --health-retries=3"
POSTGRES_DB_OPTIONS: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3"
jobs:
mysql-tests:
name: Setup testing environment and execute tests
uses: cybex-gmbh/github-workflows/.github/workflows/tests.yml@feature/pass-db-image
strategy:
fail-fast: true
matrix:
db-image: [ "mysql:8.0", "postgres:17" ]
db-options: ["$MYSQL_DB_OPTIONS", "$POSTGRES_DB_OPTIONS"]
php: [ 8.2, 8.3 ]
laravel: [ 11.* ]
dependency-version: [ prefer-stable ]
exclude:
- db-image: postgres:17
db-options: "$MYSQL_DB_OPTIONS"
- db-image: mysql:8.0
db-options: "$POSTGRES_DB_OPTIONS"
with:
DATABASE_IMAGE: ${{ matrix.db-image }}
DATABASE_NAME: protector_test
DATABASE_OPTIONS: ${{ matrix.db-options }}
PHP_VERSION: ${{ matrix.php }}
LARAVEL_VERSION: ${{ matrix.laravel }}
DEPENDENCY_VERSION: ${{ matrix.dependency-version }}
TEST_COMMANDS: vendor/bin/phpunit -c phpunit-ci.xml.dist
#
# postgres-tests:
# name: Run tests on PostgreSQL
# uses: cybex-gmbh/github-workflows/.github/workflows/tests.yml@feature/pass-db-image
# strategy:
# fail-fast: true
# matrix:
# php: [ 8.2, 8.3 ]
# laravel: [ 11.* ]
# dependency-version: [ prefer-stable ]
# with:
# DATABASE_IMAGE: postgres:17
# DATABASE_NAME: protector_test
# DATABASE_OPTIONS: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
# PHP_VERSION: ${{ matrix.php }}
# LARAVEL_VERSION: ${{ matrix.laravel }}
# DEPENDENCY_VERSION: ${{ matrix.dependency-version }}
# TEST_COMMANDS: vendor/bin/phpunit -c phpunit-ci.xml.dist