Skip to content

Update testing.yml

Update testing.yml #7

Workflow file for this run

name: testing
on:
push:
branches: [ "unit-testing" ]
pull_request:
branches: [ "unit-testing" ]
jobs:
phpunit:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1, 8.2, 8.3]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Determine composer cache directory on Linux.
if: matrix.os == 'ubuntu-latest'
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Update composer.
run: composer self-update
- name: Install dependencies with composer.
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Run tests with phpunit with code coverage.
run: vendor/bin/phpunit tests