Skip to content

Feat/GitHub actions #18

Feat/GitHub actions

Feat/GitHub actions #18

Workflow file for this run

name: Code Style Analysis
on:
pull_request: ~
push:
branches:
- master
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1]
dependency-version: [prefer-stable]
name: ${{ matrix.php }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: cs2pr
- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --ansi --no-interaction --prefer-dist
- name: PHPStan
run: composer run phpstan:test -- --error-format=checkstyle | cs2pr
- name: PHP CS Fixer
run: composer run csfixer:test -- --dry-run
- name: Rector
run: composer run rector:test -- --dry-run
- name: PHPInsight
run: composer run insights
- name: PHPInsight - Summary only
run: composer run insights -- --summary