Skip to content

Commit eefc345

Browse files
authored
Merge pull request #168 from Automattic/release/0.7.0
2 parents 660b53e + a9cbda0 commit eefc345

File tree

15 files changed

+330
-180
lines changed

15 files changed

+330
-180
lines changed

.github/workflows/changelog.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/cs-lint.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
strategy:
2323
matrix:
24-
php: ['7.1', '8.1']
24+
php: ['7.4', '8.2']
2525
experimental: [false]
2626
include:
27-
- php: '8.2'
27+
- php: '8.3'
2828
experimental: true
2929
fail-fast: false
3030

@@ -49,28 +49,21 @@ jobs:
4949
uses: korelstar/xmllint-problem-matcher@v1
5050

5151
- name: Checkout code
52-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5353

5454
# Install dependencies and handle caching in one go.
5555
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
5656
- name: Install Composer dependencies
57-
if: ${{ matrix.php < 8.2 }}
5857
uses: ramsey/composer-install@v2
5958

60-
- name: Install Composer dependencies for PHP >= 8.2
61-
if: ${{ matrix.php >= 8.2 }}
62-
uses: ramsey/composer-install@v2
63-
with:
64-
composer-options: --ignore-platform-reqs
65-
6659
# Lint PHP.
6760
- name: Lint PHP against parse errors
6861
run: composer lint-ci --no-interaction | cs2pr
6962

7063
# Needed as runs-on: system doesn't have xml-lint by default.
7164
# @link https://github.com/marketplace/actions/xml-lint
7265
- name: Lint phpunit.xml.dist
73-
if: ${{ matrix.php >= 7.3 }}
66+
if: ${{ matrix.php >= 8.0 }}
7467
uses: ChristophWurst/xmllint-action@v1
7568
with:
7669
xml-file: ./phpunit.xml.dist

.github/workflows/deploy.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,18 @@ on:
55

66
# Allow manually triggering the workflow.
77
workflow_dispatch:
8+
89
jobs:
910
tag:
1011
name: New tag
11-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout repository
14-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1516

1617
- name: Install Dependencies
1718
run: npm install
1819

19-
- name: Populate Changelog
20-
run: node .github/workflows/changelog.js
21-
env:
22-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
2420
- name: WordPress Plugin Deploy
2521
uses: 10up/action-wordpress-plugin-deploy@stable
2622
env:

.github/workflows/integrations.yml

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,58 @@ on:
1111
# Allow manually triggering the workflow.
1212
workflow_dispatch:
1313

14+
# Cancels all previous workflow runs for the same branch that have not yet completed.
15+
concurrency:
16+
# The concurrency group contains the workflow name and the branch name.
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1420
jobs:
1521
test:
1622
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
17-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-latest
1824

1925
env:
2026
WP_VERSION: ${{ matrix.wordpress }}
2127

2228
strategy:
23-
# PHP 7.1 uses PHPUnit 7.5.20
24-
# PHP 7.2 uses PHPUnit 8.5.21
25-
# PHP 7.3 uses PHPUnit 9.5.10
26-
# PHP 7.4 uses PHPUnit 9.5.10
27-
# PHP 8.0 uses PHPUnit 9.5.10
28-
# PHP 8.1 uses PHPUnit 9.5.10
29-
# PHP 8.2 uses PHPUnit 9.5.10
30-
# Key:
31-
# - coverage: Whether to run the tests with code coverage.
32-
# - experimental: Whether the build is "allowed to fail".
3329
matrix:
34-
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
35-
wordpress: ['5.5', '5.6', '5.7', '5.8', '5.9']
36-
experimental: [false]
37-
coverage: [none]
30+
php: [ '7.4', '8.2' ]
31+
wordpress: [ '5.7', '6.3' ]
32+
allowed_failure: [false]
33+
coverage: [false]
3834
include:
39-
- php: '7.1'
40-
wordpress: '5.8.3'
41-
experimental: false
42-
coverage: none
35+
# Check upcoming WP.
36+
- php: '8.2'
37+
wordpress: 'trunk'
38+
allowed_failure: true
39+
coverage: false
40+
# Check upcoming PHP.
41+
- php: '8.3'
42+
wordpress: 'latest'
43+
allowed_failure: true
44+
coverage: false
45+
# Code coverage on latest PHP and WP.
46+
- php: '8.2'
47+
wordpress: 'latest'
48+
allowed_failure: false
49+
coverage: true
50+
exclude:
51+
# WordPress 5.7 doesn't support PHP 8.2.
52+
- php: '8.2'
53+
wordpress: '5.7'
4354
fail-fast: false
44-
continue-on-error: ${{ matrix.experimental }}
55+
continue-on-error: ${{ matrix.allowed_failure }}
56+
4557
steps:
4658
- name: Checkout code
47-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
4860

4961
- name: Setup PHP ${{ matrix.php }}
5062
uses: shivammathur/setup-php@v2
5163
with:
5264
php-version: ${{ matrix.php }}
53-
extensions: ${{ matrix.extensions }}
54-
coverage: ${{ matrix.coverage }}
65+
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
5566

5667
- name: Setup problem matchers for PHP
5768
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -60,14 +71,7 @@ jobs:
6071
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6172

6273
- name: Install Composer dependencies
63-
if: ${{ matrix.php < 8.2 }}
64-
uses: ramsey/composer-install@v2
65-
66-
- name: Install Composer dependencies for PHP >= 8.2
67-
if: ${{ matrix.php >= 8.2 }}
6874
uses: ramsey/composer-install@v2
69-
with:
70-
composer-options: --ignore-platform-reqs
7175

7276
- name: Start MySQL Service
7377
run: sudo systemctl start mysql.service
@@ -80,4 +84,17 @@ jobs:
8084
run: composer prepare-ci --no-interaction
8185

8286
- name: Run integration tests
87+
if: ${{ matrix.coverage == false }}
8388
run: composer test --no-interaction
89+
90+
- name: Run integration tests with code coverage
91+
if: ${{ matrix.coverage == true }}
92+
run: composer coverage-ci --no-interaction
93+
94+
- name: Send coverage report to Codecov
95+
if: ${{ success() && matrix.coverage == true }}
96+
uses: codecov/codecov-action@v3
97+
with:
98+
files: ./clover.xml
99+
fail_ci_if_error: true
100+
verbose: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/.phpunit.result.cache
1+
/.phpunit.cache
2+
/clover.xml
23
/composer.lock
34
/package-lock.json
45
/vendor

.phpcs.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<rule ref="PHPCompatibilityWP"/>
3131
<!-- For help in understanding this testVersion:
3232
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
33-
<config name="testVersion" value="7.1-"/>
33+
<config name="testVersion" value="7.4-"/>
3434

3535
<!-- Rules: WordPress Coding Standards - see
3636
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
@@ -39,7 +39,7 @@
3939
<rule ref="WordPress-Docs"/>
4040
<!-- For help in understanding these custom sniff properties:
4141
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
42-
<config name="minimum_supported_wp_version" value="5.5"/>
42+
<config name="minimum_supported_wp_version" value="5.7"/>
4343

4444
<!-- Rules: WordPress VIP - see
4545
https://github.com/Automattic/VIP-Coding-Standards -->

0 commit comments

Comments
 (0)