Skip to content

fix: Allow PHP Unit 10 #30

fix: Allow PHP Unit 10

fix: Allow PHP Unit 10 #30

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [8.0, 8.1, 8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
- name: 'Install PHP'
uses: 'shivammathur/setup-php@v2'
with:
coverage: 'none'
php-version: '${{ matrix.php-version }}'
- name: 'Get composer cache directory'
run: echo "composer_cache=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: 'Cache dependencies'
uses: actions/cache@v3
with:
path: ${{ env.composer_cache }}
key: deps-php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}-dep-${{ matrix.dependency-version }}
- name: 'Install dependencies'
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: 'PHPUnit Tests'
run: vendor/bin/phpunit
static-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [8.0, 8.1, 8.2, 8.3]
dependency-version: [ prefer-lowest, prefer-stable ]
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
- name: 'Install PHP'
uses: 'shivammathur/setup-php@v2'
with:
coverage: 'none'
php-version: '${{ matrix.php-version }}'
tools: cs2pr
- name: 'Get composer cache directory'
run: echo "composer_cache=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: 'Cache dependencies'
uses: actions/cache@v3
with:
path: ${{ env.composer_cache }}
key: deps-php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}-dep-${{ matrix.dependency-version }}
- name: 'Install dependencies'
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: 'Psalm'
run: ./vendor/bin/psalm
code-standards:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [8.3]
dependency-version: [ prefer-lowest, prefer-stable ]
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
- name: 'Install PHP'
uses: 'shivammathur/setup-php@v2'
with:
coverage: 'none'
php-version: '${{ matrix.php-version }}'
tools: cs2pr
- name: 'Get composer cache directory'
run: echo "composer_cache=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: 'Cache dependencies'
uses: actions/cache@v3
with:
path: ${{ env.composer_cache }}
key: deps-php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}-dep-${{ matrix.dependency-version }}
- name: 'Install dependencies'
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: 'Check code standards'
run: ./vendor/bin/ecs check