Skip to content

Fix github actions

Fix github actions #7

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
on:
- "pull_request"
- "push"
name: "phpunit"
jobs:
tests:
name: "Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 8.1
- 8.2
- 8.3
dependencies:
- lowest
- highest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- 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@v2
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"
- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"
- name: "Tests"
run: "vendor/bin/phpunit"