Skip to content

Add Pint job to Code style workflow (#102) #255

Add Pint job to Code style workflow (#102)

Add Pint job to Code style workflow (#102) #255

Workflow file for this run

name: Code style
on:
pull_request: null
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: relay
tools: composer
coverage: none
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Run PHPStan
run: composer run phpstan
pint:
name: Pint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: relay
tools: composer, pint, cs2pr
coverage: none
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Run Pint
id: pint
run: composer exec -- pint --verbose --test
- name: Annotate Pint results
if: ${{ failure() && steps.pint.outcome == 'failure' }}
run: composer exec -- pint --test --format=checkstyle | cs2pr
compatibility:
name: Compatibility
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: pantheon-systems/phpcompatibility-action@v1
with:
test-versions: 7.4-
editorconfig:
name: EditorConfig
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check EditorConfig
uses: greut/eclint-action@v0