-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.04 KB
/
Copy pathci.yml
File metadata and controls
84 lines (69 loc) · 2.04 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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
code-quality:
name: Code quality
runs-on: ubuntu-24.04
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
tools: composer
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Validate Composer configuration
run: composer validate --strict
- name: Run PHP lint
run: composer lint
- name: Run PHPCS
run: composer phpcs
- name: Run PHPStan
run: composer phpstan
test:
name: WP-CLI ${{ matrix.wp_cli }} / PHP ${{ matrix.php }} / WordPress ${{ matrix.wordpress }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- php: '7.2'
wordpress: '6.9'
wp_cli: '^2.12'
- php: '8.5'
wordpress: latest
wp_cli: '^2.12'
- php: '8.5'
wordpress: latest
wp_cli: '3.0.x-dev'
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
extensions: pdo_sqlite, zip
coverage: none
tools: composer
- name: Install dependencies
run: composer update --with "wp-cli/wp-cli:${{ matrix.wp_cli }}" --no-interaction --prefer-dist
- name: Run Behat
env:
WP_VERSION: ${{ matrix.wordpress }}
WP_CLI_TEST_DBTYPE: sqlite
run: composer behat