Skip to content

Enable tests on github actions #4

Enable tests on github actions

Enable tests on github actions #4

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
units-tests:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2']
fail-fast: false
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer Directory
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Run unit tests
run: ./vendor/bin/phpunit --testsuite unit_tests