Skip to content

Commit 780790e

Browse files
authored
Merge pull request #728 from Automattic/develop
Cut a new release from develop
2 parents bd2f429 + a36d498 commit 780790e

Some content is hidden

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

59 files changed

+26157
-32665
lines changed

.eslines.json

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

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
*.build.js
2+
node_modules
3+
vendor
4+
*.php

.eslintrc.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
require( '@automattic/eslint-plugin-wpvip/init' );
2+
3+
module.exports = {
4+
extends: [ 'plugin:@automattic/wpvip/recommended' ],
5+
root: true,
6+
env: {
7+
jest: true,
8+
},
9+
rules: {
10+
"no-prototype-builtins": 0,
11+
"no-eval": 0,
12+
"complexity": 0,
13+
"camelcase": 0,
14+
"no-undef": 0,
15+
"wpcalypso/import-docblock": 0,
16+
"valid-jsdoc": 0,
17+
"react/prop-types": 0,
18+
"react/react-in-jsx-scope": 0,
19+
"react-hooks/rules-of-hooks": 0,
20+
"no-redeclare": 0,
21+
"no-shadow": 0,
22+
"no-nested-ternary": 0,
23+
"no-var": 0,
24+
"no-unused-vars": 0,
25+
"no-useless-escape": 0,
26+
"prefer-const": 0,
27+
"no-global-assign": 0,
28+
"no-constant-binary-expression": 0,
29+
"valid-typeof": 0,
30+
"eqeqeq": 0,
31+
"radix": 0,
32+
"no-eq-null": 0,
33+
"array-callback-return": 0,
34+
"no-unused-expressions": 0,
35+
"no-alert": 0,
36+
"no-lonely-if": 0,
37+
}
38+
};

.github/workflows/behat-test.yml

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

.github/workflows/e2e-and-js-tests.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,27 @@ name: E2E and JS tests
22

33
on: push
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
610
test:
711
runs-on: ubuntu-latest
812
continue-on-error: false
913

10-
env:
11-
# Currently these tests are being run for PHP 7.4 only
12-
# TODO: When a new version of wp-env (after 4.0.2) including this https://github.com/WordPress/gutenberg/pull/30651
13-
# is released, we can switch all PHP tests using wp-env
14-
WP_ENV_PHP_VERSION: 7.4
15-
1614
strategy:
17-
fail-fast: false
15+
fail-fast: true
1816

1917
steps:
2018
- name: Checkout code
21-
uses: actions/checkout@master
19+
uses: actions/checkout@v4
2220

23-
- name: Set up NodeJS 14.x
24-
uses: actions/setup-node@v2
21+
- name: Set up NodeJS 20
22+
uses: actions/setup-node@v4
2523
with:
26-
node-version: '14'
24+
node-version: '20'
25+
cache: npm
2726

2827
- name: Build Edit Flow
2928
run: |
@@ -33,11 +32,11 @@ jobs:
3332
- name: Install WordPress with wp-env
3433
run: npm run wp-env start
3534

36-
- name: Run Lint JS
35+
- name: Run Lint JS
3736
run: npm run lint-js
38-
39-
- name: Run JS tests (Jest)
37+
38+
- name: Run Jest tests
4039
run: npm run test-jest
41-
42-
- name: Run E2E tests
43-
run: npm run test-e2e
40+
41+
- name: Run E2E tests
42+
run: npm run test-e2e

.github/workflows/php-tests.yml

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,54 @@ name: PHP Tests
22

33
on: push
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
610
test:
7-
name: WP ${{ matrix.wp }} and PHP ${{ matrix.php }}
8-
# Ubuntu-20.x includes MySQL 8.0, which causes `caching_sha2_password` issues with PHP < 7.4
9-
# https://www.php.net/manual/en/mysqli.requirements.php
10-
# TODO: change to ubuntu-latest when we no longer support PHP < 7.4
11-
runs-on: ubuntu-16.04
11+
# Alias 'master' to 'latest'
12+
name: WP ${{ matrix.wp == 'master' && 'latest' || matrix.wp }} and PHP ${{ matrix.php }}
13+
runs-on: ubuntu-latest
1214
continue-on-error: ${{ matrix.allowed_failure }}
1315

1416
strategy:
1517
fail-fast: false
1618
matrix:
17-
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ]
18-
wp: [ '5.6', '5.7' ]
19-
allowed_failure: [ false ]
2019
include:
20+
# Check lowest supported WP version, with the lowest supported PHP.
2121
- php: '8.0'
22-
wp: '5.6'
23-
allowed_failure: true
24-
- php: '8.0'
25-
wp: '5.7'
26-
allowed_failure: true
22+
wp: '6.0'
23+
allowed_failure: false
24+
# Check latest WP with the highest supported PHP.
25+
- php: 'latest'
26+
wp: 'master'
27+
allowed_failure: false
2728

2829
steps:
2930
- name: Checkout code
30-
uses: actions/checkout@master
31+
uses: actions/checkout@v4
32+
33+
- name: Install wordpress environment
34+
run: npm -g install @wordpress/env
3135

3236
- name: Setup PHP ${{ matrix.php }}
3337
uses: shivammathur/setup-php@v2
3438
with:
3539
php-version: ${{ matrix.php }}
36-
coverage: pcov
37-
# https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions
38-
extensions: curl, dom, exif, fileinfo, hash, json, mbstring, mysqli, libsodium, openssl, pcre, imagick, xml, zip
40+
tools: composer
3941

40-
- name: Install Composer dependencies (PHP < 8.0 )
41-
if: ${{ matrix.php < 8.0 }}
42-
uses: ramsey/composer-install@v1
43-
44-
- name: Install Composer dependencies (PHP >= 8.0)
45-
if: ${{ matrix.php >= 8.0 }}
46-
uses: ramsey/composer-install@v1
42+
- name: Install Composer dependencies
43+
uses: ramsey/composer-install@v3
4744
with:
48-
composer-options: --ignore-platform-reqs
49-
50-
- name: Start MySQL service
51-
run: sudo systemctl start mysql.service
45+
composer-options: --prefer-dist --no-progress
5246

53-
- name: Install WordPress test site
54-
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wp }}
47+
- name: Setup wp-env
48+
run: wp-env start
49+
env:
50+
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wp }}
5551

5652
- name: Run PHPCS diff tests
57-
# TODO: remove this condition when a new version of WPCS is released
58-
# @see https://github.com/Automattic/Edit-Flow/issues/638#issuecomment-825511819
59-
if: ${{ matrix.php < 8.0 }}
6053
run: bash bin/phpcs-diff.sh
6154

6255
- name: Run PHPUnit tests (single site)

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
node_modules
55
wordpress
66
vendor
7+
8+
# Test files
9+
.phpunit.result.cache
10+
artifacts/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
vendor
3+
*.php
4+
package-lock.json
5+
package.json
6+
*.build.js

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@automattic/eslint-plugin-wpvip/prettierrc"

0 commit comments

Comments
 (0)