-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (75 loc) · 2.13 KB
/
integrate.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
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
name: "Integrate"
on:
pull_request: null
push:
branches:
- stable
- develop
jobs:
syntax-check:
name: "Syntax check on all PHP versions"
runs-on: "ubuntu-latest"
strategy:
matrix:
php: ['8.1', '8.2.', '8.3']
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php }}
- name: "PHP lint"
run: "find *.php includes/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l"
coding-standard:
name: "Check coding standard"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.2"
- name: "Install PHPCS"
run: |
composer require --no-plugins --dev wp-coding-standards/wpcs
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer run post-install-cmd
- name: "Run PHPCS"
run: "vendor/bin/phpcs --standard=WordPress-Core *.php src/"
static-analysis:
name: "Run static analysis"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.2"
- name: "Install PHPStan"
run: "composer require --dev szepeviktor/phpstan-wordpress"
- name: "Run PHPStan"
run: "vendor/bin/phpstan analyze"
phpunit:
name: ${{ matrix.php-versions }} PHPUnit Tests
runs-on: "ubuntu-latest"
strategy:
matrix:
php-versions: ['8.1', '8.2.', '8.3']
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Set PHP version"
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php-versions }}
coverage: none
tools: phpunit, phpunit-polyfills, composer:v2
env:
debug: true
- name: "Install dependencies"
run: "composer install"
- name: "PHPUnit Tests"
run: './vendor/bin/phpunit'