-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.04 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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: wordpress/plugin-check-action@v1
with:
exclude-checks: |
late_escaping
plugin_review_phpcs
file_type
plugin_readme