-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 1.75 KB
/
ci.yml
File metadata and controls
75 lines (61 loc) · 1.75 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
jobs:
phpcs:
name: PHP Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer, cs2pr
- name: Install dependencies
run: composer install --no-progress --prefer-dist
- name: Run PHPCS
# Security-focused checks only. Warnings are non-blocking until
# all wp_unslash() and table-name-interpolation issues are resolved.
run: vendor/bin/phpcs --report=checkstyle -q | cs2pr || true
phpstan:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist
- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress || true
php-compat:
name: PHP 7.4 Compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist
- name: Check PHP 7.4 compatibility
run: >-
vendor/bin/phpcs
--standard=PHPCompatibilityWP
--runtime-set testVersion 7.4-
--extensions=php
--ignore=vendor/,sdk/vendor/,build/,dist/
.