Skip to content

Configure workflows

Configure workflows #1

Workflow file for this run

name: 'Tests'
on:
pull_request:
push:
branches:
- main
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
check_command: ['normalize-dry-run', 'check-style', 'phpstan', 'phpunit-ci-coverage']
php_version: ['8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: 'xdebug'
php-version: ${{ matrix.php_version }}
env:
fail-fast: true
- name: Cache dependencies
uses: actions/cache@v3
with:
path: '~/.cache/composer'
key: "cache-composer-${{ hashFiles('**/app/composer.lock') }}"
restore-keys: 'cache-composer-'
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run ${{ matrix.check_command }}
run: composer run ${{ matrix.check_command }}