Skip to content

Bump actions/checkout from 3 to 4 #74

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #74

Workflow file for this run

name: build
on: [push]
jobs:
coding-standards:
name: Coding Standards Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- name: Install composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
- name: Run ECS
run: vendor/bin/ecs check
tests:
name: Tests
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
db-version:
- '5.7'
- '8.0'
php-versions:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
services:
mysql:
image: "mysql:${{ matrix.db-version }}"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: dbunit
options: >-
--health-cmd="mysqladmin ping --silent"
ports:
- '3406:3306'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: pdo_mysql, libxml, dom
coverage: none
- name: Install composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
- name: Override config
run: cp ci/phpunit/phpunit.96.xml phpunit.xml.dist
if: ${{ matrix.php-versions == '7.4' || matrix.php-versions == '8.0' }}
- name: Run PHPUnit
run: vendor/bin/phpunit --colors=always --config phpunit.xml.dist
coverage:
name: Tests coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: pcov
- name: Install composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --testsuite=unit --colors=always --coverage-clover=clover.xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: clover.xml