Skip to content

Commit

Permalink
Add QA tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens committed Feb 4, 2024
1 parent 7b69518 commit 3c5b25a
Show file tree
Hide file tree
Showing 7 changed files with 1,369 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint

on:
push:
branches:
- main
pull_request:

jobs:
lint:
name: QA
runs-on: ubuntu-latest
strategy:
matrix:
php: ["8.2", "8.3"]

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl
coverage: none
tools: composer:v2, cs2pr

- name: Validate PHP syntax
run: find . -maxdepth 1 -name '*.php' -exec php --syntax-check {} +

- name: Validate composer.json
run: composer validate --no-check-publish

- run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest

- run: vendor/bin/phpcs -q --report=checkstyle | cs2pr

- run: ./vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr

- name: Run wp-plugin-check
uses: swissspidy/wp-plugin-check-action@v1
with:
exclude-checks: |
late_escaping
plugin_review_phpcs
file_type
plugin_readme
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
vendor
Loading

0 comments on commit 3c5b25a

Please sign in to comment.