Skip to content

Merge pull request 'feature: integrated phpmd and baseline' (#4) from… #24

Merge pull request 'feature: integrated phpmd and baseline' (#4) from…

Merge pull request 'feature: integrated phpmd and baseline' (#4) from… #24

Workflow file for this run

name: Unit tests
on: push
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.4','8.3']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo # Add your extensions here.
coverage: xdebug
- 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: Prepare tests
run: composer run-script tests_prepare
- name: Run Rector
run: composer run rector
- name: Run PHPMD
run: composer run phpmd
- name: Run PHPStan
run: composer run phpstan
- name: Run PHPUnit
run: composer run phpunit