Skip to content

Merge pull request #70: Partially fixed "Magic constants resolve to a… #27

Merge pull request #70: Partially fixed "Magic constants resolve to a…

Merge pull request #70: Partially fixed "Magic constants resolve to a… #27

Workflow file for this run

name: PHP Tests
on:
push:
branches: [ "master" ]
permissions:
contents: read
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-version: [ '8.1', '8.2' ]
name: PHP ${{ matrix.php-version }} tests on ${{ matrix.operating-system }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install PHP
id: php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Check PHP version
run: php -v
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.operating-system }}-php-${{ steps.php.outputs.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.operating-system }}-php-${{ steps.php.outputs.php-version }}
- if: steps.composer-cache.outputs.cache-hit != 'true'
name: Install Composer dependencies
run: composer install --prefer-dist --no-progress
- name: PHPUnit Tests
run: vendor/bin/phpunit --testsuite=Tests --coverage-clover ./tests/coverage.xml --display-notices
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tests/coverage.xml
flags: os-${{ matrix.operating-system }}_php-${{ matrix.php-version }}
verbose: true