Skip to content

Commit

Permalink
Merge pull request #150 from pantheon-systems/release_0.4.4
Browse files Browse the repository at this point in the history
Release 0.4.4
  • Loading branch information
jazzsequence authored Dec 6, 2024
2 parents 1c4c2be + 5ebc46c commit 44c38c6
Show file tree
Hide file tree
Showing 22 changed files with 1,148 additions and 626 deletions.
100 changes: 2 additions & 98 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,18 @@ workflows:
version: 2
main:
jobs:
- lint
- test-behat
- test-phpunit-74
- test-phpunit-82
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
- main
jobs:
- test-behat
jobs:
lint:
working_directory: ~/pantheon-systems/pantheon-hud
docker:
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
steps:
- checkout
- restore_cache:
keys:
- test-lint-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-lint-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: "Run PHP Lint"
command: |
composer phpcs
test-behat:
working_directory: ~/pantheon-systems/pantheon-hud
parallelism: 1
Expand Down Expand Up @@ -76,84 +55,9 @@ jobs:
exit 0
fi
terminus auth:login --machine-token=$TERMINUS_TOKEN
- run: ./bin/validate-fixture-version.sh
- run: ./bin/behat-prepare.sh
- run: ./bin/behat-test.sh --strict
- run:
command: ./bin/behat-cleanup.sh
when: always
test-phpunit-74:
working_directory: ~/pantheon-systems/pantheon-hud
docker:
- image: circleci/php:7.4-node-browsers
- 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-74-dependencies-{{ checksum "composer.json" }}
- run: composer update && composer install -n --prefer-dist
- save_cache:
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
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.5
- 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
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-82:
working_directory: ~/pantheon-systems/pantheon-hud
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
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
22 changes: 22 additions & 0 deletions .github/workflows/build-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build, Tag and Release
on:
push:
branches:
- 'release'

permissions:
pull-requests: write
contents: write

jobs:
tag:
name: Tag and Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build, tag and release
uses: pantheon-systems/plugin-release-actions/build-tag-release@main
with:
gh_token: ${{ github.token }}
generate_release_notes: "true"
draft: "true"
99 changes: 99 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Lint & Test
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- '**'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHP Lint
run: composer phpcs
wporg-validation:
name: WP.org Plugin Validation
runs-on: ubuntu-latest
steps:
- uses: pantheon-systems/[email protected]
with:
type: 'plugin'
validate-readme-spacing:
name: Validate README Spacing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pantheon-systems/validate-readme-spacing@v1
php8-compatibility:
name: PHP 8.x Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: PHP Compatibility
uses: pantheon-systems/phpcompatibility-action@dev
with:
test-versions: 8.0-
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php
test-phpunit-74:
needs: lint
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.5
name: PHP 7.4 Unit Tests
steps:
- uses: actions/checkout@v3
- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mysqli, zip, imagick
- name: Start MySQL Service
run: sudo systemctl start mysql
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/vendor
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
restore-keys: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
- name: Install Composer dependencies
run: |
composer update && composer install
- name: Run PHP linting
run: composer phplint
- name: Run PHPUnit
run: bash ./bin/phpunit-test.sh
test-phpunit-83:
needs: lint
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
name: PHP 8.3 Unit Tests
steps:
- uses: actions/checkout@v3
- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mysqli, zip, imagick
- name: Start MySQL Service
run: sudo systemctl start mysql
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/vendor
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
restore-keys: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
- name: Install Composer dependencies
run: composer install
- name: Run PHP linting
run: composer phplint
- name: Run PHPUnit
run: bash ./bin/phpunit-test.sh
18 changes: 18 additions & 0 deletions .github/workflows/tested-up-to.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate Plugin "Tested Up To" Version
on:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write

jobs:
validate-wp-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Plugin Tested Up To Version
uses: jazzsequence/action-validate-plugin-version@v1
with:
filenames: 'readme.txt,README.md'
branch: 'main'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
binding.*
node_modules/
vendor/
bin/helpers.sh
bin/install-local-tests.sh
bin/install-wp-tests.sh
bin/phpunit-test.sh
5 changes: 1 addition & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Code owners. See:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @pantheon-systems/cms-ecosystem
* @pantheon-systems/site-experience
39 changes: 28 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ Please feel free to file issues there. Pull requests are also 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`.
The `main` branch is the development branch which means it contains the next version to be released. `release` contains the corresponding stable development version. Always work on the `main` branch and open up PRs against `main`.

We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`.

`main` should be stable and usable, though possibly a few commits ahead of the public release on wp.org.

The `release` branch matches the latest stable release deployed to [wp.org](wp.org).

## Testing

You may notice there are three sets of tests running:

* [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) to detect violations of `wp-coding-standards/wpcs` coding standards.
* [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) to detect violations of [Pantheon WP Coding Standards](https://github.com/pantheon-systems/Pantheon-WP-Coding-Standards).
* [PHPUnit](https://phpunit.de/) test suite.
* [Behat](http://behat.org/) test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.

Expand All @@ -28,13 +34,24 @@ Note that dependencies are installed via Composer and the `vendor` directory is

## Release Process

1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes.
1. Update plugin version in `package.json`, `README.md`, `readme.txt`, and `pantheon-hud.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. From `main`, checkout a new branch `release_X.Y.Z`.
1. Make a release commit:
* Drop the `-dev` from the version number in `package.json`, `README.md`, `readme.txt`, and `pantheon-hud.php`.
* Update the "X.Y.Z-dev" heading in the changelog to the new version number with the date
* Commit these changes with the message `Release X.Y.Z`
* Push the release branch up.
1. Open a Pull Request to merge `release_X.Y.Z` into `release`. Your PR should consist of all commits to `main` since the last release, and one commit to update the version number. The PR name should also be `Release X.Y.Z`.
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `release`. Use a "merge" commit, do no not rebase or squash.
1. Pull `release` 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/pantheon-hud/releases/new), naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues if applicable.
1. Wait for the [_Release pantheon-hud plugin to wp.org_ action](https://github.com/pantheon-systems/pantheon-hud/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/pantheon-hud/. This may take a few minutes.
1. Create a [new release](https://github.com/pantheon-systems/pantheon-hud/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](readme.txt) into the body of the release, including the links to the closed issues if applicable.
1. Wait for the [_Release pantheon-hud plugin to wp.org_ action](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org plugin 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 [the plugin repository](https://wordpress.org/plugins/pantheon-hud/). This may take a few minutes.
1. Following the release, prepare the next dev version with the following steps:
* `git checkout develop`
* `git rebase release`
* Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`)
* Add a new `** X.Y.Z-dev **` heading to the changelog where `X.Y.Z-dev` is the new patch version.
* `git add -A .`
* `git commit -m "Prepare X.Y.X-dev"`
* `git push origin develop`
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function( grunt ) {
'README.md': 'readme.txt'
},
options: {
screenshot_url: 'https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/master/{screenshot}.png',
screenshot_url: 'https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/main/{screenshot}.png',
},
},
},
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Pantheon HUD #
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence)
**Tags:** Pantheon, hosting
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [jspellman](https://profiles.wordpress.org/jspellman/), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence), [pwtyler](https://profiles.wordpress.org/pwtyler)
**Tags:** Pantheon, hosting, environment-indicator
**Requires at least:** 4.9
**Tested up to:** 6.2
**Stable tag:** 0.4.3
**Tested up to:** 6.7.1
**Stable tag:** 0.4.4
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

A heads-up display into your Pantheon environment.

## Description ##

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/pantheon-systems/pantheon-hud/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/pantheon-systems/pantheon-hud/tree/master)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/pantheon-systems/pantheon-hud/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/pantheon-systems/pantheon-hud/tree/main)
[![Lint & Test](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/lint-test.yml/badge.svg)](https://github.com/pantheon-systems/pantheon-hud/actions/workflows/lint-test.yml)
[![Actively Maintained](https://img.shields.io/badge/Pantheon-Actively_Maintained-yellow?logo=pantheon&color=FFDC28)](https://docs.pantheon.io/oss-support-levels#actively-maintained-support)

This plugin provides situational awareness of the Pantheon plaform from within your WordPress dashboard. It's helpful to be reminded what environment you're in, as well as providing quick links to get back to Pantheon's dashboard, or to interface with your WordPress installation via the command line.
Expand All @@ -35,13 +36,19 @@ By default, the Pantheon HUD appears for logged-in users with the `manage_option
## Screenshots ##

### 1. Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links. ###
![Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links.](https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/master/screenshot-1.png)
![Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links.](https://raw.githubusercontent.com/pantheon-systems/pantheon-hud/main/screenshot-1.png)


## Changelog ##
### 0.4.3 (April 6, 2023) ###
* Update Composer dependencies [[#116](https://github.com/pantheon-systems/pantheon-hud/pull/116)] [[#118](https://github.com/pantheon-systems/pantheon-hud/pull/118)]
* Update Actively Maintained anchor link [[#102](https://github.com/pantheon-systems/pantheon-hud/pull/102)]
### 0.4.4 (December 6, 2024 ###
* Fix admin bar item layout issue [[#145](https://github.com/pantheon-systems/pantheon-hud/pull/145)] props @cbirdsong and @westonruter
* Update CONTRIBUTING.md [[#123](https://github.com/pantheon-systems/pantheon-hud/pull/123)]
* Added "environment-indicator" to tags [[#128](https://github.com/pantheon-systems/pantheon-hud/pull/128)]
* Updates Pantheon WP Coding Standards to 2.0 [[#131](https://github.com/pantheon-systems/pantheon-hud/pull/131)]

### 0.4.3 (April 6, 2023) ###
* Update Composer dependencies [[#116](https://github.com/pantheon-systems/pantheon-hud/pull/116)] [[#118](https://github.com/pantheon-systems/pantheon-hud/pull/118)]
* Update Actively Maintained anchor link [[#102](https://github.com/pantheon-systems/pantheon-hud/pull/102)]
* Update Tested up to version.

### 0.4.2 (January 23, 2023) ###
Expand Down
Loading

0 comments on commit 44c38c6

Please sign in to comment.