Skip to content

Add checks on php 8.3 also #6

Add checks on php 8.3 also

Add checks on php 8.3 also #6

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.1"
- "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.1"
services:
postgres:
image: "postgres:15"
env:
POSTGRES_PASSWORD: "postgres"
options: >-
--health-cmd "pg_isready"
ports:
- "5432:5432"
mysql:
image: "mysql:8.0"
# https://stackoverflow.com/questions/60902904/how-to-pass-mysql-native-password-to-mysql-service-in-github-actions
options: >-
--health-cmd "mysqladmin ping --silent"
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
-e MYSQL_DATABASE=dqo
--entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
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"