Skip to content

Merge pull request #91 from szepeviktor/patch-1 #252

Merge pull request #91 from szepeviktor/patch-1

Merge pull request #91 from szepeviktor/patch-1 #252

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.3', '8.4']
include:
- php: '8.2'
coverage: 'true'
name: PHP ${{ matrix.php }} tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
- name: Install dependencies
run: composer update --no-interaction
- name: Execute tests
if: ${{ ! matrix.coverage }}
run: |
./vendor/bin/phpunit --testdox
- name: Upload the reports to codeclimate
if: ${{ matrix.coverage }}
env:
XDEBUG_MODE: coverage
CC_TEST_REPORTER_ID: 5e32818628fac9eb11d34e2b35289f88169610cc4a98c6f170c74923342284f1
uses: paambaati/codeclimate-action@v9
with:
coverageCommand: |
./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --testdox
- name: Upload the reports to coveralls.io
if: ${{ matrix.coverage }}
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ env.COVERALLS_REPO_TOKEN }}
flag-name: Unit
allow-empty: false