Skip to content

Update the phpstan baseline #34

Update the phpstan baseline

Update the phpstan baseline #34

Workflow file for this run

name: Run phpunit tests
permissions:
contents: read
on: [push]
jobs:
test-php:
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: testdb
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
MYSQL_RANDOM_ROOT_PASSWORD: yes
ports:
- "3306:3306"
options: --name mysql-server --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
os: [ubuntu-latest]
experimental: [false]
include:
- { php-version: 'nightly', os: ubuntu-latest, experimental: true }
steps:
- uses: actions/checkout@v4
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: mbstring
- name: Cache module
uses: actions/cache@v4
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction
- name: Copy config
run: cp tests/config.dist.php tests/config.php
- name: Run php tests
run: composer run phpunit
env:
TEST_MYSQL_HOST: "127.0.0.1"
TEST_MYSQL_DB: testdb
TEST_MYSQL_USER: testuser
TEST_MYSQL_PASS: testpass
TEST_MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
- name: Send coverage
uses: codecov/codecov-action@v4
with:
file: "./build/logs/clover.xml"
token: ${{ secrets.CODECOV_TOKEN }}