update WF #34
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: CS - File lint and file validation | |
on: | |
push: | |
pull_request: | |
paths: | |
- '**workflows/lint.yml' | |
- '**.php' | |
- '**phpcs.xml.dist' | |
- '**composer.json' | |
jobs: | |
lint: | |
name: ✔ CS check al files | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '--skip ci') && !github.event.pull_request.draft" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Validate php files | |
run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l | |
- uses: ramsey/composer-install@v3 | |
- name: Coding standard | |
run: composer run cs |