Skip to content

PHPUnit tests

PHPUnit tests #165

Workflow file for this run

name: "PHPUnit tests"
on:
pull_request:
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.head_ref || 'cron' }}
cancel-in-progress: true
jobs:
phpunit:
name: PHPUnit tests on PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}"
restore-keys: "php-${{ matrix.php-version }}"
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Tests
run: vendor/bin/phpunit