Skip to content

Commit

Permalink
Merge pull request #360 from pantheon-systems/release_2.1.4
Browse files Browse the repository at this point in the history
* Add pantheon-wp-coding-standards (#339)

* add our coding standard

* run phpcbf

* updates the ruleset name to be less generic

* add rule exclusions in specific files

* bump the php test version

* remove excluded squiz rule
we're handling that inside Pantheon-WP

* manual rule exclusions

* use wp_kses to sanitize output

* validate & sanitize PHP superclobal

* set lint php version to 8.0

* Bump symfony/filesystem from 5.4.21 to 5.4.23 (#341)

Bumps [symfony/filesystem](https://github.com/symfony/filesystem) from 5.4.21 to 5.4.23.
- [Release notes](https://github.com/symfony/filesystem/releases)
- [Changelog](https://github.com/symfony/filesystem/blob/6.2/CHANGELOG.md)
- [Commits](symfony/filesystem@v5.4.21...v5.4.23)

---
updated-dependencies:
- dependency-name: symfony/filesystem
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update CONTRIBUTING.md

* fixup changelog and prepare 2.1.4-dev

* Bump yoast/phpunit-polyfills from 1.0.5 to 2.0.0 (#343)

* Bump yoast/phpunit-polyfills from 1.0.5 to 2.0.0

Bumps [yoast/phpunit-polyfills](https://github.com/Yoast/PHPUnit-Polyfills) from 1.0.5 to 2.0.0.
- [Release notes](https://github.com/Yoast/PHPUnit-Polyfills/releases)
- [Changelog](https://github.com/Yoast/PHPUnit-Polyfills/blob/2.x/CHANGELOG.md)
- [Commits](Yoast/PHPUnit-Polyfills@1.0.5...2.0.0)

---
updated-dependencies:
- dependency-name: yoast/phpunit-polyfills
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Phil Tyler <[email protected]>

* Bump symfony/filesystem from 5.4.23 to 5.4.25

Bumps [symfony/filesystem](https://github.com/symfony/filesystem) from 5.4.23 to 5.4.25.
- [Release notes](https://github.com/symfony/filesystem/releases)
- [Changelog](https://github.com/symfony/filesystem/blob/6.3/CHANGELOG.md)
- [Commits](symfony/filesystem@v5.4.23...v5.4.25)

---
updated-dependencies:
- dependency-name: symfony/filesystem
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add the wporg-validator action (#350)

* add the wporg-validator action

* updates changelog

* Fix Readme.md spacing and add linting to ensure it remains (#355)

* Fix typo in the label for the certificate path (#352)

* [CMSP-519] Tested up to WordPress 6.3 (#354)

* Update changelog and CONTRIBUTING (#356)

* [CMSP-668] Update to latest Pantheon WP Coding Standard (#357)

* use latest pantheon wp coding standards

* linting fixes

* bump lockfile

* update changelog

* fix readme

* [BUGS-7135]: Updates code to resolve auth issue. (#359)

* [BUGS-7135]: Updates code to resolve auth issue.

* if wp login not permitted, force saml auth

* run phpcbf for easy lint fixes

* bump dependencies

* don't activate a non-existant theme

* change the parent theme

* restore the theme to activate back to the custom one

* rename the theme styles
this is always going to point to the parent theme, so it's better for the stylesheet name to be something generic rather than something outdated

* update element that contains the page title

* be more verbose in our logging
because this prepare script differs from most of our other behat-prepare scripts, let's be more explicit about the steps so we know what it's doing when we look back at this in six+ months

* fix CAPSLOCK

* use the lint-test GHA to run linting

* remove the :

---------

Co-authored-by: Ryan Wagner <[email protected]>
Co-authored-by: Chris Reynolds <[email protected]>

* [CMSP-480] mVDP Readme Update (#349)

* adds Patchstack info to readme(s)

* update changelog

* bump version to 2.1.4

* update changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Phil Tyler <[email protected]>
Co-authored-by: J Ryan Wagner <[email protected]>
Co-authored-by: mscherer <[email protected]>
Co-authored-by: Ryan Wagner <[email protected]>
  • Loading branch information
6 people authored Nov 27, 2023
2 parents 858c993 + 7ba3bae commit 61aea3e
Show file tree
Hide file tree
Showing 18 changed files with 1,445 additions and 872 deletions.
32 changes: 2 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,18 @@ workflows:
version: 2
main:
jobs:
- lint
- test-behat:
requires:
- lint
- test-behat
- test-phpunit:
name: "Test with PHP 7.4"
requires:
- lint
php_version: "7.4"
- test-phpunit:
name: "Test with PHP 8.0"
requires:
- lint
php_version: "8.0"
- test-phpunit:
name: "Test with PHP 8.1"
requires:
- lint
php_version: "8.1"
- test-phpunit:
name: "Test with PHP 8.2"
requires:
- lint
php_version: "8.2"
nightly:
triggers:
Expand All @@ -38,24 +27,6 @@ workflows:
jobs:
- test-behat
jobs:
lint:
working_directory: ~/pantheon-systems/wp-saml-auth
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/wp-saml-auth
parallelism: 1
Expand Down Expand Up @@ -96,6 +67,7 @@ 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:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# On push, run the action-wporg-validator workflow.
name: Lint and Test
on: [push]
jobs:
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
wporg-validation:
name: WP.org Validator
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: WP.org Validator
uses: pantheon-systems/[email protected]
with:
type: plugin
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint
run: |
composer install
composer lint
31 changes: 22 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Pull requests and issues are welcome!

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`.

We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `develop` when merging, and to include the PR # in the commit message. PRs to `develop` 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 `develop`. We do not update the README changelogs for development or process related PRs (i.e. dev-only dependencies, or changes to CI patterns unrelated to new features).

## Testing

You may notice there are two sets of tests running, on two different services:
Expand All @@ -25,12 +27,23 @@ Behat requires a Pantheon site. Once you've created the site, you'll need [insta

## 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 `wp-saml-auth.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. [Check the _Build and Tag_ action](https://github.com/pantheon-systems/wp-saml-auth/actions/workflows/build-tag.yml): a new tag named with the version number should've been created. It should contain all the built assets.
1. Create a [new release](https://github.com/pantheon-systems/wp-saml-auth/releases/new), 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-saml-auth plugin to wp.org_ action](https://github.com/pantheon-systems/wp-saml-auth/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-saml-auth/. This may take a few minutes.
1. From `develop`, checkout a new branch `release_X.Y.Z`.
1. Make a release commit:
* Drop the `-dev` from the version number in `README.md`, `readme.txt`, and `wp-saml-auth.php`.
* 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 `main`. Your PR should consist of all commits to `develop` 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](./CODEOWNERS), merge the PR into `master`. "Rebase and merge" is preferred in this case. _Never_ squash to `master`.
1. Pull `master` locally, create a new tag (based on version number from previous steps), and push up. The tag should _only_ be the version number. It _should not_ be prefixed `v` (i.e. `X.Y.Z`, not `vX.Y.X`).
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-saml-auth/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 wp-saml-auth plugin to wp.org_ action](https://github.com/pantheon-systems/wp-saml-auth/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/wp-saml-auth/). This may take a few minutes.
1. Following the release, prepare the next dev version with the following steps:
* `git checkout develop`
* `git rebase master`
* 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.X-dev **` heading to the changelogs
* `git add -A .`
* `git commit -m "Prepare X.Y.X-dev"`
* `git push origin develop`
Loading

0 comments on commit 61aea3e

Please sign in to comment.