Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.4 #150

Merged
merged 42 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
743c847
replace wpcs with our standard
jazzsequence Apr 14, 2023
35b1f46
use our standard in phpcs.xml
jazzsequence Apr 14, 2023
6e836e0
remove the core ruleset
jazzsequence Apr 14, 2023
09b6920
add a cbf script
jazzsequence Apr 14, 2023
3b93fdf
phpcs changes for class-toolbar
jazzsequence Apr 14, 2023
edb4ca5
ignore the vip rule as a short-term solution
jazzsequence Apr 14, 2023
75de233
fix where the rule exclusions go
jazzsequence Apr 14, 2023
4b4cac4
linting fixes
jazzsequence Apr 14, 2023
1536a13
set to Pantheon-WP
jazzsequence Apr 14, 2023
3e57a77
set php version for linter to 8.0
jazzsequence Apr 14, 2023
e081899
update to latest Pantheon coding standard & remove the exclusions
jazzsequence Apr 14, 2023
fc88d31
Merge pull request #122 from pantheon-systems/add-pantheon-wp-coding-…
jazzsequence Apr 14, 2023
bc1515c
Update contributing.md (#123)
Jun 1, 2023
9ed76a1
Switch to GH Actions & add WP.org validation (#124)
jazzsequence Jul 6, 2023
2bd10dc
Lint README for lost spacing (#126)
pwtyler Jul 14, 2023
85e0950
add status badge (#125)
jazzsequence Jul 14, 2023
a3db7b1
add "environment indicator" to tags (#128)
jazzsequence Jul 18, 2023
01e4640
[CMSP-519] Tested up to WordPress 6.3 (#129)
pwtyler Aug 11, 2023
3f84a53
Bump yoast/phpunit-polyfills from 1.0.5 to 2.0.0 (#130)
dependabot[bot] Aug 16, 2023
63c80c9
[CMSP-664] Update linting for latest Pantheon WP Coding Standards (#131)
jazzsequence Sep 12, 2023
340b607
Switch to using main/release rather than develop/main (#133)
jazzsequence Oct 3, 2023
73142f5
set circle badge to main rather than master (#134)
jazzsequence Oct 3, 2023
fa93b95
[cmsp-679] PHP 8.3 compatibility checks (#135)
jazzsequence Oct 4, 2023
9d2d09f
add john back as contributor (#136)
jazzsequence Oct 5, 2023
5d6184c
[CMSP-721] Ensure that Behat tests run on PHP 8.3 (#138)
jazzsequence Nov 16, 2023
31dcfdf
Bump braces from 3.0.2 to 3.0.3 (#139)
dependabot[bot] Aug 1, 2024
13ed987
Update CODEOWNERS for new team names (#140)
greg-1-anderson Aug 28, 2024
f2d0cef
Add or update catalog-info.yml
namespacebrian Sep 10, 2024
5ef460c
Merge pull request #142 from pantheon-systems/add-catalog-info-20240910
namespacebrian Sep 10, 2024
29c2293
Rename catalog-info.yml to catalog-info.yaml
namespacebrian Sep 23, 2024
6446751
Merge pull request #143 from pantheon-systems/rename-catalog-info-202…
namespacebrian Sep 23, 2024
912606a
[SITE-2846] Fix admin bar item layout issue (#145)
cbirdsong Nov 25, 2024
81df09a
add jazzsequence/action-validate-plugin-version (#148)
jazzsequence Dec 6, 2024
663ba4b
update changelog and add phil
jazzsequence Dec 6, 2024
bfa02e4
drop -dev
jazzsequence Dec 6, 2024
ab352ad
add build and release action (#151)
jazzsequence Dec 6, 2024
d467fa1
Merge branch 'main' into release_0.4.4
jazzsequence Dec 6, 2024
79d6319
fix stable tag
jazzsequence Dec 6, 2024
53b7f7b
ignore scripts from wpunit-helpers
jazzsequence Dec 6, 2024
22f0bba
remove tests added by wpunit-helpers
jazzsequence Dec 6, 2024
d8fd313
remove install-wp-tests
jazzsequence Dec 6, 2024
5ebc46c
add wpunit-helpers
jazzsequence Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading