Skip to content

Commit

Permalink
Add check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed May 19, 2024
1 parent 3c9c462 commit e9b14b8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check

on:
push:
branches: [ "2.x" ]

permissions:
contents: read

jobs:
check:

runs-on: ubuntu-latest

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer

- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install

- name: Check coding style
run: composer fix:check

- name: Run PHPStan
run: composer phpstan
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"scripts": {
"fix": "php-cs-fixer fix --config=formwork/.php-cs-fixer.php --cache-file=formwork/.php-cs-fixer.cache --verbose",
"fix:check": "php-cs-fixer check --config=formwork/.php-cs-fixer.php --cache-file=formwork/.php-cs-fixer.cache",
"phpstan": "phpstan analyse --configuration=formwork/phpstan.neon",
"phpstan:baseline": "phpstan analyse --configuration=formwork/phpstan.neon --generate-baseline=formwork/phpstan-baseline.neon",
"rector": "rector --config=formwork/.rector.php",
Expand Down

0 comments on commit e9b14b8

Please sign in to comment.