Skip to content

Commit

Permalink
Merge branch 'develop' into fix/359-blank-password-php8-redis6
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence authored Apr 5, 2023
2 parents 5eccb44 + 78fb2a4 commit 00a520c
Show file tree
Hide file tree
Showing 20 changed files with 1,384 additions and 1,835 deletions.
103 changes: 94 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ workflows:
jobs:
- lint
- test-behat
- test-phpunit-redis-disabled
- test-phpunit-redis-enabled
- test-phpunit-redis-disabled-74
- test-phpunit-redis-enabled-74
- test-phpunit-redis-disabled-82
- test-phpunit-redis-enabled-82
nightly:
triggers:
- schedule:
Expand All @@ -21,7 +23,7 @@ jobs:
lint:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: quay.io/pantheon-public/build-tools-ci:6.x
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
steps:
- checkout
- restore_cache:
Expand All @@ -40,7 +42,7 @@ jobs:
working_directory: ~/pantheon-systems/wp-redis
parallelism: 1
docker:
- image: quay.io/pantheon-public/build-tools-ci:6.x
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
- run:
command: ./bin/behat-cleanup.sh
when: always
test-phpunit-redis-disabled:
test-phpunit-redis-disabled-74:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: circleci/php:7.4-node-browsers
Expand All @@ -93,15 +95,16 @@ jobs:
- checkout
- restore_cache:
keys:
- test-phpunit-dependencies-{{ checksum "composer.json" }}
- test-phpunit-74-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-phpunit-dependencies-{{ checksum "composer.json" }}
key: test-phpunit-74-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: "Install Extras"
command: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
sudo apt-get update
sudo apt-get install subversion
sudo apt-get install -y libmagickwand-dev --no-install-recommends
Expand Down Expand Up @@ -132,15 +135,16 @@ jobs:
- checkout
- restore_cache:
keys:
- test-phpunit-dependencies-{{ checksum "composer.json" }}
- test-phpunit-74-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-phpunit-dependencies-{{ checksum "composer.json" }}
key: test-phpunit-74-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: "Install Extras"
command: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
sudo apt-get update
sudo apt-get install subversion
sudo apt-get install -y libmagickwand-dev --no-install-recommends
Expand All @@ -160,3 +164,84 @@ jobs:
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
composer phpunit -d memory_limit=4G
test-phpunit-redis-disabled-82:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: cimg/php:8.2.0
- image: circleci/mariadb:10.3
environment:
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
- WP_CORE_DIR: "/tmp/wordpress/"
steps:
- checkout
- restore_cache:
keys:
- test-phpunit-82-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-phpunit-82-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: "Install Extras"
command: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
sudo apt-get update
sudo apt-get install subversion
sudo apt-get install -y libmagickwand-dev --no-install-recommends
yes '' | sudo pecl install imagick || true
sudo docker-php-ext-enable imagick
sudo docker-php-ext-install mysqli
sudo apt-get install mariadb-client-10.6
- run:
name: "Run Tests"
command: |
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
composer phpunit
WP_MULTISITE=1 composer phpunit
WP_REDIS_USE_CACHE_GROUPS=1 composer phpunit
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
composer phpunit
test-phpunit-redis-enabled-82:
working_directory: ~/pantheon-systems/wp-redis
docker:
- image: cimg/php:8.2.0
- image: circleci/mariadb:10.3
- image: circleci/redis:latest
environment:
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
- WP_CORE_DIR: "/tmp/wordpress/"
steps:
- checkout
- restore_cache:
keys:
- test-phpunit-82-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-phpunit-82-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: "Install Extras"
command: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
sudo apt-get update
sudo apt-get install subversion
sudo apt-get install -y libmagickwand-dev --no-install-recommends
yes '' | sudo pecl install imagick || true
sudo docker-php-ext-enable imagick
sudo docker-php-ext-install mysqli
sudo apt-get install mariadb-client-10.6
yes '' | sudo pecl install redis || true
sudo docker-php-ext-enable redis
- run:
name: "Run Tests"
command: |
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
composer phpunit
WP_MULTISITE=1 composer phpunit
WP_REDIS_USE_CACHE_GROUPS=1 composer phpunit
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
composer phpunit
41 changes: 0 additions & 41 deletions .distignore

This file was deleted.

27 changes: 27 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Directories
/.circleci export-ignore
/.git export-ignore
/.github export-ignore
/.wordpress-org export-ignore
/tests export-ignore
/node_modules export-ignore
/vendor export-ignore
/bin export-ignore

# Files
/.DS_Store export-ignore
/Thumbs.db export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/behat.yml export-ignore
/CODEOWNERS export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/CONTRIBUTING.md export-ignore
/Gruntfile.js export-ignore
/package-lock.json export-ignore
/package.json export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ updates:
interval: weekly
timezone: America/Los_Angeles
day: tuesday
target-branch: "develop"
open-pull-requests-limit: 99
ignore:
- dependency-name: phpunit/phpunit
Expand All @@ -22,4 +23,5 @@ updates:
interval: weekly
timezone: America/Los_Angeles
day: tuesday
target-branch: "develop"
open-pull-requests-limit: 99
16 changes: 16 additions & 0 deletions .github/workflows/wordpress-plugin-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release wp-redis plugin to wp.org
on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: WordPress Plugin Deploy
uses: 10up/[email protected]
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: ${{ env.SLUG }}
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Contributing ##

The best way to contribute to the development of this plugin is by participating on the GitHub project:

https://github.com/pantheon-systems/wp-redis

Pull requests and issues are welcome!

## Workflow

The `develop` branch is the development branch which means it contains the next version to be released. `master` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.

## Testing

You may notice there are two sets of tests running, on two different services:

* The [PHPUnit](https://phpunit.de/) test suite.
* The [Behat](http://behat.org/) test suite runs against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.

Both of these test suites can be run locally, with a varying amount of setup.

PHPUnit requires the [WordPress PHPUnit test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/), and access to a database with name `wordpress_test`. If you haven't already configured the test suite locally, you can run `bash bin/install-wp-tests.sh wordpress_test root '' localhost`. You'll also need to enable Redis and the PHPRedis extension in order to run the test suite against Redis.

Behat requires a Pantheon site with Redis enabled. Once you've created the site, you'll need [install Terminus](https://github.com/pantheon-systems/terminus#installation), and set the `TERMINUS_TOKEN`, `TERMINUS_SITE`, and `TERMINUS_ENV` environment variables. Then, you can run `./bin/behat-prepare.sh` to prepare the site for the test suite.

## Release Process

1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes.
1. Update plugin version in `README.md`, `readme.txt`, and `wp-redis.php`.
1. Update the Changelog with the latest changes.
1. Create a PR against the `master` branch.
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `master`.
1. Pull `master` locally, create a new tag, and push up.
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
1. Create a [new release](https://github.com/pantheon-systems/wp-redis/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from the `Changelog` section of the `README` into the body of the release and include a link to the closed issues if applicable.
1. Wait for the [_Release wp-redis plugin to wp.org_ action](https://github.com/pantheon-systems/wp-redis/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/wp-redis/. This may take a few minutes.
27 changes: 0 additions & 27 deletions Gruntfile.js

This file was deleted.

33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [mboynes](https://profiles.wordpress.org/mboynes), [Outlandish Josh](https://profiles.wordpress.org/Outlandish Josh)
**Tags:** cache, plugin, redis
**Requires at least:** 3.0.1
**Tested up to:** 5.9
**Stable tag:** 1.2.0
**Tested up to:** 6.1.1
**Stable tag:** 1.3.2
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -78,22 +78,7 @@ Use `wp help redis <command>` to learn more about each command.

## Contributing ##

The best way to contribute to the development of this plugin is by participating on the GitHub project:

https://github.com/pantheon-systems/wp-redis

Pull requests and issues are welcome!

You may notice there are two sets of tests running, on two different services:

* Travis CI runs the [PHPUnit](https://phpunit.de/) test suite in a variety of environment configurations (e.g. Redis enabled vs. Redis disabled).
* Circle CI runs the [Behat](http://behat.org/) test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.

Both of these test suites can be run locally, with a varying amount of setup.

PHPUnit requires the [WordPress PHPUnit test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/), and access to a database with name `wordpress_test`. If you haven't already configured the test suite locally, you can run `bash bin/install-wp-tests.sh wordpress_test root '' localhost`. You'll also need to enable Redis and the PHPRedis extension in order to run the test suite against Redis.

Behat requires a Pantheon site with Redis enabled. Once you've created the site, you'll need [install Terminus](https://github.com/pantheon-systems/terminus#installation), and set the `TERMINUS_TOKEN`, `TERMINUS_SITE`, and `TERMINUS_ENV` environment variables. Then, you can run `./bin/behat-prepare.sh` to prepare the site for the test suite.
See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-redis/blob/master/CONTRIBUTING.md) for information on contributing.

## Frequently Asked Questions ##

Expand All @@ -119,6 +104,18 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a

## Changelog ##

### 1.3.2 (December 5, 2022) ###
* Fix broken `wp_cache_supports` function [[#382](https://github.com/pantheon-systems/wp-redis/pull/382)].

### 1.3.1 (December 2, 2022) ###
* Declare `wp_cache_supports` function and support features. [[#378](https://github.com/pantheon-systems/wp-redis/pull/378)]
* Make dependabot target `develop` branch for PRs. [[#376](https://github.com/pantheon-systems/wp-redis/pull/376)]

Declare `wp_cache_supports` function and support features. [[#378](https://github.com/pantheon-systems/wp-redis/pull/378)]

### 1.3.0 (November 29, 2022) ###
* Added CONTRIBUTING.MD and GitHub action to automate deployments to wp.org. [[#368](https://github.com/pantheon-systems/wp-redis/pull/368)]

### 1.2.0 (February 17, 2022) ###
* Adds support for Relay via `WP_REDIS_USE_RELAY` constant [[#344](https://github.com/pantheon-systems/wp-redis/pull/344)].

Expand Down
Loading

0 comments on commit 00a520c

Please sign in to comment.