Skip to content

Minor test updates

Minor test updates #98

Workflow file for this run

name: Unit Tests
on:
pull_request: null
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
name: PHP ${{ matrix.php-versions }} Tests
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
ini-values: max_execution_time=15
env:
update: true
- name: Composer
run: composer update
- name: Tests (PHPUnit 8)
env:
XDEBUG_MODE: coverage
run: ./vendor/bin/phpunit -c phpunit.8.xml --coverage-clover clover.xml
if: (matrix.php-versions == '7.0') || (matrix.php-versions == '7.1') || (matrix.php-versions == '7.2')
- name: Tests (PHPUnit 9)
env:
XDEBUG_MODE: coverage
run: ./vendor/bin/phpunit -c phpunit.9.xml --coverage-clover clover.xml
if: (matrix.php-versions == '7.3') || (matrix.php-versions == '7.4') || (matrix.php-versions == '8.0')
- name: Tests (PHPUnit 10)
env:
XDEBUG_MODE: coverage
run: ./vendor/bin/phpunit -c phpunit.xml --coverage-clover clover.xml
if: (!contains(matrix.php-versions, '7.')) && (matrix.php-versions != '8.0')
- name: Coveralls Test Submission
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }}
run: ./vendor/bin/php-coveralls -x clover.xml -o coverage.json -v
finish:
name: Close Coveralls Run
needs: tests
runs-on: ubuntu-latest
steps:
- name: Close Coveralls Run
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_ENDPOINT: https://coveralls.io
run: curl -k $COVERALLS_ENDPOINT/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$GITHUB_RUN_ID&payload[status]=done"