Skip to content

Remove hardcoded fieldname #109

Remove hardcoded fieldname

Remove hardcoded fieldname #109

Workflow file for this run

name: PHPUnit
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: mp_test
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
env:
extensions: intl,memcached,apcu,mysql
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
db: ['mysql', 'sqlite']
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: date.timezone=Europe/Berlin
php-version: "${{ matrix.php }}"
extensions: "${{ env.extensions }}"
- name: Start MySQL service
if: "${{ matrix.db == 'mysql' }}"
run: |
mysql --host=localhost --port=${{ job.services.mysql.ports[3306] }} --protocol=TCP -u root -e 'create database IF NOT EXISTS mp_test;'
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
# PHP 7.3 mysql ext complains about unknown MySQL authentication method,
# and older MySQL does not work with current GH 7.4 and 8.0 images,
# so for now, we skip one of the 7.3 tasks
if: "${{ matrix.db != 'mysql' || matrix.php != '7.3'}}"
run: vendor/bin/phpunit
env:
DB: travis/${{ matrix.db }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}