Skip to content

Commit

Permalink
Merge pull request #728 from Automattic/develop
Browse files Browse the repository at this point in the history
Cut a new release from develop
  • Loading branch information
ingeniumed authored Jun 3, 2024
2 parents bd2f429 + a36d498 commit 780790e
Show file tree
Hide file tree
Showing 59 changed files with 26,157 additions and 32,665 deletions.
11 changes: 0 additions & 11 deletions .eslines.json

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.build.js
node_modules
vendor
*.php
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
require( '@automattic/eslint-plugin-wpvip/init' );

module.exports = {
extends: [ 'plugin:@automattic/wpvip/recommended' ],
root: true,
env: {
jest: true,
},
rules: {
"no-prototype-builtins": 0,
"no-eval": 0,
"complexity": 0,
"camelcase": 0,
"no-undef": 0,
"wpcalypso/import-docblock": 0,
"valid-jsdoc": 0,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react-hooks/rules-of-hooks": 0,
"no-redeclare": 0,
"no-shadow": 0,
"no-nested-ternary": 0,
"no-var": 0,
"no-unused-vars": 0,
"no-useless-escape": 0,
"prefer-const": 0,
"no-global-assign": 0,
"no-constant-binary-expression": 0,
"valid-typeof": 0,
"eqeqeq": 0,
"radix": 0,
"no-eq-null": 0,
"array-callback-return": 0,
"no-unused-expressions": 0,
"no-alert": 0,
"no-lonely-if": 0,
}
};
27 changes: 0 additions & 27 deletions .github/workflows/behat-test.yml

This file was deleted.

33 changes: 16 additions & 17 deletions .github/workflows/e2e-and-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@ name: E2E and JS tests

on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
continue-on-error: false

env:
# Currently these tests are being run for PHP 7.4 only
# TODO: When a new version of wp-env (after 4.0.2) including this https://github.com/WordPress/gutenberg/pull/30651
# is released, we can switch all PHP tests using wp-env
WP_ENV_PHP_VERSION: 7.4

strategy:
fail-fast: false
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Set up NodeJS 14.x
uses: actions/setup-node@v2
- name: Set up NodeJS 20
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
cache: npm

- name: Build Edit Flow
run: |
Expand All @@ -33,11 +32,11 @@ jobs:
- name: Install WordPress with wp-env
run: npm run wp-env start

- name: Run Lint JS
- name: Run Lint JS
run: npm run lint-js
- name: Run JS tests (Jest)

- name: Run Jest tests
run: npm run test-jest
- name: Run E2E tests
run: npm run test-e2e

- name: Run E2E tests
run: npm run test-e2e
59 changes: 26 additions & 33 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,54 @@ name: PHP Tests

on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: WP ${{ matrix.wp }} and PHP ${{ matrix.php }}
# Ubuntu-20.x includes MySQL 8.0, which causes `caching_sha2_password` issues with PHP < 7.4
# https://www.php.net/manual/en/mysqli.requirements.php
# TODO: change to ubuntu-latest when we no longer support PHP < 7.4
runs-on: ubuntu-16.04
# Alias 'master' to 'latest'
name: WP ${{ matrix.wp == 'master' && 'latest' || matrix.wp }} and PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed_failure }}

strategy:
fail-fast: false
matrix:
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ]
wp: [ '5.6', '5.7' ]
allowed_failure: [ false ]
include:
# Check lowest supported WP version, with the lowest supported PHP.
- php: '8.0'
wp: '5.6'
allowed_failure: true
- php: '8.0'
wp: '5.7'
allowed_failure: true
wp: '6.0'
allowed_failure: false
# Check latest WP with the highest supported PHP.
- php: 'latest'
wp: 'master'
allowed_failure: false

steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Install wordpress environment
run: npm -g install @wordpress/env

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

- name: Install Composer dependencies (PHP < 8.0 )
if: ${{ matrix.php < 8.0 }}
uses: ramsey/composer-install@v1

- name: Install Composer dependencies (PHP >= 8.0)
if: ${{ matrix.php >= 8.0 }}
uses: ramsey/composer-install@v1
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --ignore-platform-reqs

- name: Start MySQL service
run: sudo systemctl start mysql.service
composer-options: --prefer-dist --no-progress

- name: Install WordPress test site
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wp }}
- name: Setup wp-env
run: wp-env start
env:
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wp }}

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

- name: Run PHPUnit tests (single site)
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
node_modules
wordpress
vendor

# Test files
.phpunit.result.cache
artifacts/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
vendor
*.php
package-lock.json
package.json
*.build.js
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@automattic/eslint-plugin-wpvip/prettierrc"
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": [ "." ]
}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ For support questions, feedback and ideas, please use the [WordPress.org forums]

## Upgrade Notice

**0.9.9**
Bump minimum PHP supported version to 8.0, WordPress minimum supported version to 6.0.

**0.9.8**
PHP 8.2 compatible with various bug fixes

Expand Down Expand Up @@ -128,6 +131,16 @@ New features, including story budget and editorial metadata, a completely rewrit

## Changelog

**0.9.9 (May 24, 2024)**
* Enhancements: bump lowest supported PHP version to 8.0 and lowest WordPress version to 6.0 (https://github.com/Automattic/Edit-Flow/pull/727)
* Test fix: Update ESLint configuration and format JS files (https://github.com/Automattic/Edit-Flow/pull/723)
* Enhancements: Move JS environment to node 20, upgrade packages (https://github.com/Automattic/Edit-Flow/pull/725)

**0.9.8 (April 10, 2024)**
* Fix WP 5.9 deprecation notice with `who` in `WP_User_Query` (https://github.com/Automattic/Edit-Flow/pull/701)
* Add PHP 8.2 fixes (https://github.com/Automattic/Edit-Flow/pull/700)
* Bump @babel/traverse from 7.1.6 to 7.23.2 (https://github.com/Automattic/Edit-Flow/pull/714)

**0.9.7 (August 26, 2022)**
* Bug fix: Allow scheduled posts to be shifted around on calendar (https://github.com/Automattic/Edit-Flow/pull/614)
* Bug fix: Add back unpublish status, small css tweak for statuses (https://github.com/Automattic/Edit-Flow/pull/613)
Expand Down
13 changes: 0 additions & 13 deletions bin/docker-compose.override.yml.template

This file was deleted.

Loading

0 comments on commit 780790e

Please sign in to comment.