Skip to content

Commit 646308a

Browse files
committed
Merge remote-tracking branch 'origin/release/9.5.0' into trunk
2 parents 122368d + 7c0f2ba commit 646308a

File tree

146 files changed

+3144
-1634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3144
-1634
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Did I add a title? A descriptive, yet concise, title.
66
Issue: Link to the GitHub issue this PR addresses (if appropriate).
77
-->
88

9-
Fixes STRIPE-<issue_id>
9+
Fixes STRIPE-<linear_issue_id>
10+
Fixes #<github_issue_id>
1011

1112
## Changes proposed in this Pull Request:
1213

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHP Code Coverage Comment
2+
description: Composite Action with steps to add a comment to a PR with PHP Code Coverage results
3+
4+
inputs:
5+
php-version:
6+
description: PHP version to use
7+
type: string
8+
default: ''
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Checking out
14+
uses: actions/checkout@v2
15+
16+
- name: Set up dependencies caching
17+
uses: actions/cache@v4
18+
with:
19+
path: ~/.cache/composer/
20+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
21+
22+
- name: Set up PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ inputs.php-version }}
26+
coverage: xdebug
27+
28+
- name: Run CI tests with coverage report
29+
shell: bash
30+
run: bash bin/run-ci-tests.bash
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PHP Code Coverage Comment
2+
description: Composite Action with steps to add a comment to a PR with PHP Code Coverage results
3+
4+
inputs:
5+
changed-files:
6+
type: string
7+
default: ''
8+
pr-number:
9+
type: number
10+
default: ''
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Code Coverage Report
16+
uses: irongut/CodeCoverageSummary@v1.3.0
17+
with:
18+
filename: php-coverage.xml
19+
format: markdown
20+
hide_branch_rate: false
21+
hide_complexity: true
22+
indicators: true
23+
output: both
24+
thresholds: '60 80'
25+
26+
- name: Filter Changed Files in Report
27+
shell: bash
28+
run: |
29+
echo "### 📈 PHP Unit Code Coverage Report" > code-coverage-results-filtered.md
30+
echo "Package | Line Rate | Health" >> code-coverage-results-filtered.md
31+
echo "-------- | --------- | ------" >> code-coverage-results-filtered.md
32+
grep -E "$(echo ${{ inputs.changed-files }} | tr ' ' '|')" code-coverage-results.md >> code-coverage-results-filtered.md
33+
tail -n1 code-coverage-results.md >> code-coverage-results-filtered.md
34+
35+
- name: Add Coverage PR Comment
36+
uses: marocchino/sticky-pull-request-comment@v2.9.1
37+
with:
38+
skip_unchanged: true
39+
recreate: true
40+
number: ${{ inputs.pr-number }}
41+
path: code-coverage-results-filtered.md

.github/workflows/compatibility.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,5 @@ jobs:
3535
php-version: ${{ matrix.php }}
3636
coverage: none
3737

38-
- name: If PHP >= 8.0, set up PHPUnit 9.5 for compatibility
39-
if: ${{ matrix.php >= '8.0' }}
40-
run: wget https://phar.phpunit.de/phpunit-9.5.13.phar && mv phpunit-9.5.13.phar phpunit.phar
41-
4238
- name: Run CI checks
4339
run: bash bin/run-ci-tests.bash

.github/workflows/e2e-tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
max-parallel: 10
1616
matrix:
17-
checkout: [ 'Default', 'Legacy' ]
17+
checkout: [ 'Default', 'Legacy', 'OptimizedCheckout' ]
1818

1919
name: ${{ matrix.checkout }} WP=latest, WC=latest, PHP=7.4
2020
steps:
@@ -85,7 +85,14 @@ jobs:
8585
env:
8686
STRIPE_PUB_KEY: ${{ secrets.E2E_STRIPE_PUBLISHABLE_KEY }}
8787
STRIPE_SECRET_KEY: ${{ secrets.E2E_STRIPE_SECRET_KEY }}
88-
run: npm run test:e2e${{ matrix.checkout == 'Legacy' && '-legacy' || '' }}
88+
run: |
89+
if [ "${{ matrix.checkout }}" = "Legacy" ]; then
90+
npm run test:e2e-legacy
91+
elif [ "${{ matrix.checkout }}" = "OptimizedCheckout" ]; then
92+
npm run test:e2e-oc
93+
else
94+
npm run test:e2e
95+
fi
8996
9097
- name: Upload ${{ matrix.checkout }} E2E test results
9198
if: ${{ failure() }}
@@ -94,4 +101,4 @@ jobs:
94101
name: ${{ matrix.checkout }}-WP_latest-WC_latest-results
95102
path: tests/e2e/test-results
96103
if-no-files-found: ignore
97-
retention-days: 14
104+
retention-days: 14

.github/workflows/php-code-coverage.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111

1212
jobs:
1313
test:
14+
if: ${{ ! contains( github.event.head_commit.message, 'Merge branch' ) }}
1415
runs-on: ubuntu-22.04
1516
name: PHP=8.1, WP=6.7, WC=9.5.2
1617
env:
@@ -31,51 +32,15 @@ jobs:
3132
with:
3233
token: ${{ secrets.GITHUB_TOKEN }}
3334

34-
- name: Checking out
35-
uses: actions/checkout@v2
36-
37-
- name: Set up dependencies caching
38-
uses: actions/cache@v4
39-
with:
40-
path: ~/.cache/composer/
41-
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
42-
43-
- name: Set up PHP
44-
uses: shivammathur/setup-php@v2
35+
- name: Run CI tests with coverage report
36+
if: ${{ steps.get-changed-files.outputs.added_modified }}
37+
uses: ./.github/actions/ci-tests-with-coverage
4538
with:
4639
php-version: ${{ env.PHP_VERSION }}
47-
coverage: xdebug
48-
49-
- name: Set up PHPUnit 9.5
50-
run: wget https://phar.phpunit.de/phpunit-9.5.28.phar && mv phpunit-9.5.28.phar phpunit.phar
5140

52-
- name: Run CI checks
53-
run: bash bin/run-ci-tests.bash
54-
55-
- name: Code Coverage Report
56-
uses: irongut/CodeCoverageSummary@v1.3.0
57-
with:
58-
filename: php-coverage.xml
59-
format: markdown
60-
hide_branch_rate: false
61-
hide_complexity: true
62-
indicators: true
63-
output: both
64-
thresholds: '60 80'
65-
66-
- name: Filter Changed Files in Report
67-
run: |
68-
echo "### 📈 PHP Unit Code Coverage Report" > code-coverage-results-filtered.md
69-
echo "Package | Line Rate | Health" >> code-coverage-results-filtered.md
70-
echo "-------- | --------- | ------" >> code-coverage-results-filtered.md
71-
grep -E "$(echo ${{ steps.get-changed-files.outputs.all }} | tr ' ' '|')" code-coverage-results.md >> code-coverage-results-filtered.md
72-
tail -n1 code-coverage-results.md >> code-coverage-results-filtered.md
73-
74-
- name: Add Coverage PR Comment
75-
uses: marocchino/sticky-pull-request-comment@v2.9.1
41+
- name: Code coverage report comment
42+
if: ${{ steps.get-changed-files.outputs.added_modified }}
43+
uses: ./.github/actions/php-coverage-comment
7644
with:
77-
skip_unchanged: true
78-
recreate: true
79-
number: ${{ steps.number.outputs.pr }}
80-
path: code-coverage-results-filtered.md
81-
45+
changed-files: ${{ steps.get-changed-files.outputs.added_modified }}
46+
pr-number: ${{ steps.number.outputs.pr }}

.github/workflows/php-tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ jobs:
88
runs-on: ubuntu-22.04
99
strategy:
1010
fail-fast: false
11-
max-parallel: 10
11+
max-parallel: 16
1212
matrix:
1313
woocommerce_support_policy: [ 'L', 'L-1', 'L-2' ]
1414
wordpress_support_policy: [ 'L', 'L-1', 'L-2' ]
15-
php_support_policy: [ 'L', 'L-1', 'L-2' ]
15+
php_support_policy: [ 'L', 'L-1', 'L-2', 'L-3', '7.4' ]
1616
include:
1717
# WooCommerce
1818
- woocommerce_support_policy: L
19-
woocommerce: '9.7.1'
19+
woocommerce: '9.8.1'
2020
- woocommerce_support_policy: L-1
21-
woocommerce: '9.6.2'
21+
woocommerce: '9.7.1'
2222
- woocommerce_support_policy: L-2
23-
woocommerce: '9.5.2'
23+
woocommerce: '9.6.2'
2424
# WordPress
2525
- wordpress_support_policy: L
2626
wordpress: '6.7.2'
@@ -32,10 +32,14 @@ jobs:
3232
wordpress: '6.6'
3333
# PHP
3434
- php_support_policy: L
35-
php: '8.1'
35+
php: '8.3'
3636
- php_support_policy: L-1
37-
php: '8.0'
37+
php: '8.2'
3838
- php_support_policy: L-2
39+
php: '8.1'
40+
- php_support_policy: L-3
41+
php: '8.0'
42+
- php_support_policy: '7.4'
3943
php: '7.4'
4044
exclude: # incompatible versions of PHP, WordPress, and WooCommerce
4145
- woocommerce_support_policy: L
@@ -62,10 +66,6 @@ jobs:
6266
php-version: ${{ matrix.php }}
6367
coverage: xdebug
6468

65-
- name: If PHP >= 8.0 set up PHPUnit 9.5 for compatibility
66-
if: ${{ matrix.php >= '8.0' }}
67-
run: wget https://phar.phpunit.de/phpunit-9.5.28.phar && mv phpunit-9.5.28.phar phpunit.phar
68-
6969
- name: Run CI checks
7070
run: bash bin/run-ci-tests.bash
7171

.github/workflows/run-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
max-parallel: 10
2222
matrix:
23-
project: [ 'default', 'legacy', 'acss' ]
23+
project: [ 'default', 'legacy', 'acss', 'optimized-checkout' ]
2424

2525
name: E2E - ${{ matrix.project }} (WP=${{ inputs.wp-version }}, WC=${{ inputs.wc-version }}, PHP=${{ inputs.php-version }})
2626
steps:

.github/workflows/run-unit-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,5 @@ jobs:
3333
- name: Install SVN
3434
run: sudo apt-get update && sudo apt-get install -y subversion
3535

36-
- name: If PHP >= 8.0 set up PHPUnit 9.5 for compatibility
37-
if: ${{ inputs.php-version >= '8.0' }}
38-
run: wget https://phar.phpunit.de/phpunit-9.5.28.phar && mv phpunit-9.5.28.phar phpunit.phar
39-
4036
- name: Run CI tests
4137
run: bash bin/run-ci-tests.bash

bin/docker-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ cli wp option set woocommerce_allow_tracking "no"
103103
cli wp option set woocommerce_coming_soon "no"
104104

105105
echo "Importing WooCommerce shop pages..."
106-
cli wp wc --user=admin tool run install_pages
106+
cli wp --user=admin wc tool run install_pages
107107

108108
echo "Installing and activating the WordPress Importer plugin..."
109109
cli wp plugin install wordpress-importer --activate

0 commit comments

Comments
 (0)