Skip to content

Fix PHPUnit command in workflow #12

Fix PHPUnit command in workflow

Fix PHPUnit command in workflow #12

Workflow file for this run

name: PHPUnit Tests
on: [push, pull_request]
env:
CC_TEST_REPORTER_ID: 1d1f74ba47a7d5ca9fd110c771ddac54d67608513924b89df2b7ed8761541244
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
tools: composer
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer clearcache && composer install --prefer-dist
- name: Run tests
run: ./vendor/bin/phpunit tests --coverage-clover=clover.xml
- name: Code coverage
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter after-build -t clover
if: matrix.php == '8.1'
continue-on-error: true # if is fork