release: prepare version 3.1.0 #335
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths-ignore: | |
- .editorconfig | |
- .gitattributes | |
- .gitignore | |
- docs/** | |
- README.md | |
pull_request: | |
paths-ignore: | |
- .editorconfig | |
- .gitattributes | |
- .gitignore | |
- docs/** | |
- README.md | |
jobs: | |
build-php: | |
name: Build PHP | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: curl filter json | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install composer dependencies | |
run: | | |
composer remove infection/infection symplify/phpstan-rules ergebnis/composer-normalize --dev --no-update | |
composer install --prefer-dist --no-progress --no-suggest | |
- name: Run PHP linter | |
run: | | |
find . -type f -name '*.php' ! -path "./vendor/*" -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) | |
- name: Run unit tests | |
run: | | |
vendor/bin/phpunit --configuration=tests/phpunit.xml.dist | |
code-quality: | |
name: Code Quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
coverage: xdebug | |
extensions: curl filter json | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install composer dependencies | |
run: | | |
composer update --prefer-dist --no-progress | |
- name: Normalize composer.json | |
run: | | |
composer normalize --dry-run | |
- name: Check coding standards | |
run: | | |
vendor/bin/ecs check --no-progress-bar | |
- name: Run mutation tests | |
run: | | |
make mutation | |
- name: Run phpstan | |
run: | | |
make phpstan | |
- name: Run rector | |
run: | | |
make rector-dry |