Skip to content

Add github actions to automaticaly run tests #1

Add github actions to automaticaly run tests

Add github actions to automaticaly run tests #1

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
name: PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
tools: composer:v2
- name: Validate composer.json
run: composer validate --strict
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: composer-${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ runner.os }}-php-${{ matrix.php-version }}-
composer-${{ runner.os }}-
- name: Install dependencies
run: composer update --prefer-dist --no-interaction
- name: Run test suite
run: composer test