Skip to content

Add GitHub Action (GHA) for unit-tests and code-coverage. #3

Add GitHub Action (GHA) for unit-tests and code-coverage.

Add GitHub Action (GHA) for unit-tests and code-coverage. #3

name: PHP Unit Tests
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '5.5'
- '5.6'
- '7.0'
include:
- php-version: '7.0'
allow_failure: true
continue-on-error: ${{ matrix.allow_failure || false }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: xdebug
extensions: gd, json, mbstring
php-version: ${{ matrix.php-version }}
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit
- uses: codecov/codecov-action@v5
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: coverallsapp/github-action@v2
if: success()