Repository navigation
100 lines (81 loc) · 2.54 KB
/
Copy pathci.yml
File metadata and controls
100 lines (81 loc) · 2.54 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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 --memory-limit=4G || 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/
.
sdk-tests:
name: SDK behaviour and registry parity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
# Dependency-free: the pure SDK classes, the AI crawler policy, and the
# generated crawler registry replayed against the shared parity vectors.
# A hand edit to the generated table, or a regeneration whose vectors
# were not committed with it, fails here.
- name: Run tests
run: php tests/run.php
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Replay scanner report transport
run: node --test tests/ScannerReportTest.cjs tests/HandoffObservationTest.cjs