Skip to content

Add PHPCS with Gyro Coding Standard #24

Add PHPCS with Gyro Coding Standard

Add PHPCS with Gyro Coding Standard #24

Workflow file for this run

on: [push, pull_request]
name: CI
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: "cs2pr"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
- name: "PHPUnit"
run: "php vendor/bin/phpunit"
coding-standards:
name: "phpcs"
runs-on: "ubuntu-24.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
tools: "cs2pr"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
- name: "Run PHP_CodeSniffer"
run: "vendor/bin/phpcs --report=checkstyle | cs2pr"
phpstan:
name: "phpstan"
runs-on: "ubuntu-24.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
tools: "cs2pr"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
- name: "Run phpstan"
run: "vendor/bin/phpstan analyse -vvv --error-format=github"