Cleanup, add PHP file support #166
Workflow file for this run
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: Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: latest | |
coverage: none | |
tools: composer, cs2pr | |
- name: Get Composer home directory | |
id: composer-home | |
run: | | |
echo "::set-output name=dir::$(composer config home)" | |
- name: Install PHP dependencies | |
uses: ramsey/composer-install@v3 | |
- name: Install composer-normalize | |
run: composer global require ergebnis/composer-normalize | |
- name: Make Composer packages available globally | |
run: | | |
echo "${PWD}/vendor/bin" >> $GITHUB_PATH | |
echo "${{ steps.composer-home.outputs.dir }}/vendor/bin" >> $GITHUB_PATH | |
- name: Lint PHP files | |
run: phpcs -q --report=checkstyle | cs2pr | |
- name: Analyze PHP files | |
run: composer run-script analyze | |
- name: Lint composer.json | |
run: composer normalize --dry-run |