Skip to content

Fix test

Fix test #12

name: "Continuous Integration"
on:
pull_request:
branches:
- 'feature/**'
push:
branches:
- 'feature/**'
jobs:
phpunit:
name: "PHPUnit tests"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os:
- "ubuntu-22.04"
php-version:
- "8.2"
- "8.3"
dependencies:
- "highest"
- "lowest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"
dependency-versions: "${{ matrix.dependencies }}"
phpunit-integration:
name: "PHPUnit db integration tests"
runs-on: "ubuntu-22.04"
needs: "phpunit"
strategy:
matrix:
php-version:
- "8.2"
- "8.3"
services:
postgres:
image: "postgres:16"
env:
POSTGRES_DB: "dqo"
POSTGRES_PASSWORD: "postgres"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "5432:5432"
mysql:
image: "bitnami/mysql:8.0"
env:
ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: dqo
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
ports:
- "3306:3306"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/phpunit/integration.xml"