Skip to content

Tag for v3.0.0

Tag for v3.0.0 #61

Workflow file for this run

name: CodeChecks
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
name: PHP ${{ matrix.php }} tests
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: test_database
MYSQL_HOST: 127.0.0.1
MYSQL_USER: admin
MYSQL_PASSWORD: rootpass
MYSQL_ROOT_PASSWORD: rootpass
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php${{ matrix.php }}-
- name: Composer
run: composer install --no-progress
- name: Check CS
run: vendor/bin/ecs
- name: PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
INTEGRATION_ENABLED: 1
INTEGRATION_HOST: 127.0.0.1
INTEGRATION_PORT: 3306
INTEGRATION_USERNAME: root
INTEGRATION_PASSWORD: rootpass
INTEGRATION_DATABASE: test_database
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}