Skip to content

Add github actions, fix phpunit tests #1

Add github actions, fix phpunit tests

Add github actions, fix phpunit tests #1

Workflow file for this run

name: PHPUnit
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
name: PHPUnit w/ PHP ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHPUnit
run: vendor/bin/phpunit --color=always