-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 2.55 KB
/
Copy pathtests.yml
File metadata and controls
65 lines (60 loc) · 2.55 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
name: Tests
on:
push:
branches: [trunk]
pull_request:
permissions:
contents: read
jobs:
unit:
name: Unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.5'
# A coverage driver is required: the strict coverage-metadata + failOnRisky gate enforces only while coverage is collected.
coverage: pcov
tools: composer:v2
- uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- run: composer test:unit -- --coverage-text
integration:
name: Integration (${{ matrix.label }})
strategy:
fail-fast: false
matrix:
include:
# Happy path — stable WP 7.0 (the plugin's floor) runs the full integration suite; pinned, not
# nightly, so an unrelated upstream change cannot turn this job red.
- label: 'WP 7.0 (compatible)'
php-version: '8.5'
wp-env-core: 'https://wordpress.org/wordpress-7.0.zip'
composer-script: 'test:integration'
# Graceful-failure path — WP 6.9.4 is below the 7.0 floor; the requirements-only suite proves the
# gate, on a config that skips the activation core would reject below the floor.
- label: 'WP 6.9.4 (below floor)'
php-version: '8.5'
wp-env-core: 'WordPress/WordPress#tags/6.9.4'
wp-env-config-file: '.wp-env.belowfloor.json'
composer-script: 'test:requirements'
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@714fc2a66d6ae5011999beb18a4b01fb1992f4bd
with:
php-version: ${{ matrix.php-version }}
wp-env-core: ${{ matrix.wp-env-core }}
composer-script: ${{ matrix.composer-script }}
wp-env-config-file: ${{ matrix.wp-env-config-file }}
e2e:
name: E2E
uses: ahegyes/wordpress-configs/.github/workflows/reusable-playwright-e2e.yml@714fc2a66d6ae5011999beb18a4b01fb1992f4bd
with:
plugin-slug: 'dws-plugin-template'
php-version: '8.5'
# Pinned to the WP 7.0 floor, not nightly, so an unrelated upstream change cannot turn the release gate red.
wp-env-core: 'https://wordpress.org/wordpress-7.0.zip'
# Include dev deps so the framework + PHP-DI install and the
# post-autoload-dump scoping pipeline populates dependencies/.
composer-options: '--prefer-dist'
build-script: ''