Skip to content

Run Tests

Run Tests #36

Workflow file for this run

name: Tests
on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
stability: [prefer-lowest, prefer-stable]
exclude:
- php: 8.1
stability: prefer-lowest
- php: 8.2
stability: prefer-lowest
- php: 8.3
stability: prefer-lowest
name: P${{ matrix.php }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --no-coverage