Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d943f3c
[CMSP-721] Ensure Behat tests are run on PHP 8.3 site environment (#283)
jazzsequence Nov 16, 2023
46b718f
[BUGS-6643] workflow updates (#289)
jazzsequence Mar 28, 2024
07b78bb
Prepare 1.4.4-dev
pwtyler Oct 28, 2024
86cbb3d
Merge pull request #303 from pantheon-systems/release-automation-only
pwtyler Oct 29, 2024
13f0350
Update "Tested up to" in Meta (#301)
miriamgoldman Oct 29, 2024
8329d55
Fixup logic of check-status and add .gitattributes to ignored files
pwtyler Oct 29, 2024
937cad3
Further check-status adjustments
pwtyler Oct 29, 2024
5df2eed
try matching asset and .github dirs with regex
pwtyler Oct 29, 2024
918498a
Revert "try matching asset and .github dirs with regex"
pwtyler Oct 29, 2024
f3ef3dc
don't quote the wildcard for readme
pwtyler Oct 29, 2024
946791b
Try extglob for directory matching
pwtyler Oct 29, 2024
5d41acc
restore original path handling, match any path
jazzsequence Oct 29, 2024
0c16373
re-add extglob and variable paths
jazzsequence Oct 29, 2024
46103fe
remove empty line after the if to avoid error
jazzsequence Oct 29, 2024
844677d
remove globbing again
jazzsequence Oct 29, 2024
61f3c43
use $GITHUB_OUTPUT env global
jazzsequence Oct 29, 2024
cd25c9e
add debugging
jazzsequence Oct 29, 2024
5003c59
brackets around the variable inside quotes
jazzsequence Oct 29, 2024
aa5fec2
broader pattern matching
jazzsequence Oct 29, 2024
d5b6fc1
more debugging
jazzsequence Oct 29, 2024
8bcbd6c
handle the directories separately
jazzsequence Oct 29, 2024
614446d
add missing semicolon
jazzsequence Oct 29, 2024
9336d84
add trailing wildcard
jazzsequence Oct 29, 2024
034806d
Merge branch 'release' into develop
pwtyler Oct 29, 2024
f2b8548
Bump pantheon-systems/wpunit-helpers from 2.0.0 to 2.0.2 (#305)
dependabot[bot] Jan 15, 2025
57269e3
Bump pantheon-systems/pantheon-wp-coding-standards from 2.0.1 to 2.0.…
dependabot[bot] Jan 15, 2025
9d12ebe
Bump yoast/phpunit-polyfills from 2.0.0 to 3.1.1 (#306)
dependabot[bot] Jan 17, 2025
a5e3454
Bump yoast/phpunit-polyfills from 3.1.1 to 4.0.0 (#307)
dependabot[bot] Feb 18, 2025
96bc470
Updates readme files
AnaisPantheor Jun 19, 2025
4a5c711
Merge branch 'develop' into php84-comp
AnaisPantheor Jun 19, 2025
496ca03
Updates tested up in readme.txt
AnaisPantheor Jun 19, 2025
47b55ff
Updates readme for blank line
AnaisPantheor Jun 20, 2025
029575e
Adds php 8.4 in the lint test
AnaisPantheor Jun 23, 2025
8ca71df
Updates readme files
AnaisPantheor Jun 23, 2025
8eddf1e
Updates readme
AnaisPantheor Jun 23, 2025
1c6d5fb
Updates readme
AnaisPantheor Jun 23, 2025
ebb08b2
Merge pull request #309 from pantheon-systems/php84-comp
AnaisPantheor Jun 23, 2025
b7d9250
Bump pantheon-systems/wpunit-helpers from 2.0.2 to 2.0.3 (#311)
dependabot[bot] Sep 17, 2025
7947db2
Bump pantheon-systems/pantheon-wp-coding-standards from 2.0.3 to 3.0.…
dependabot[bot] Sep 17, 2025
2e4f437
Merge branch 'develop'
jazzsequence Sep 17, 2025
a50c343
Potential fix for code scanning alert no. 7: Workflow does not contai…
jazzsequence Sep 17, 2025
2398f67
Add svn to deploy workflow (#315)
jazzsequence Sep 17, 2025
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
20 changes: 0 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ workflows:
- master
jobs:
- test-behat
commands:
run_test:
steps:
- 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
bash bin/full-teardown-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
vendor/bin/phpunit --group=cli_command
WP_MULTISITE=1 vendor/bin/phpunit --group=cli_command
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
vendor/bin/phpunit --group=cli_command
jobs:
test-behat:
resource_class: small
Expand Down Expand Up @@ -81,4 +62,3 @@ jobs:
- run:
command: ./bin/behat-cleanup.sh
when: always

3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
/package.json export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/README.md export-ignore
/catalog-info.yml export-ignore
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ updates:
day: tuesday
target-branch: "develop"
open-pull-requests-limit: 99
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
timezone: America/Los_Angeles
day: tuesday
target-branch: "develop"
open-pull-requests-limit: 99
68 changes: 68 additions & 0 deletions .github/workflows/build-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build, Tag and Release
on:
push:
branches:
- release

permissions:
pull-requests: write
contents: write

jobs:
check-status:
name: Check Status
runs-on: ubuntu-latest
outputs:
is-plugin-update: ${{ steps.set-outputs.outputs.is-plugin-update }}
steps:
- uses: actions/checkout@v4
- id: get-changed-files
uses: jitterbit/get-changed-files@v1
- id: set-outputs
shell: bash
run: |
echo "Changed files: ${{ steps.get-changed-files.outputs.all }}"
shopt -s nocasematch
run_plugin_update="false"
for file in ${{ steps.get-changed-files.outputs.all }}; do
echo "Checking if file '$file' should trigger a plugin release"
if [[ "$file" == .github/* ]] || \
[[ "$file" == .wordpress.org/* ]]; then
echo "'$file' is inside an ignored directory."
continue
fi
if [[ "$file" != readme.* ]] && \
[[ "$file" != .gitattributes ]] && \
[[ "$file" != .gitignore ]] && \
[[ "$file" != catalog-info.yml ]] && \
[[ "$file" != *composer* ]]; then
echo "'$file' is not an ignored file."
run_plugin_update="true"
break
fi
done
echo "is-plugin-update=${run_plugin_update}" >> $GITHUB_OUTPUT
asset-only:
name: WP.org Asset Only Update
needs: check-status
if: ${{ needs.check-status.outputs.is-plugin-update == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: WP.org Asset Only Update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
tag:
needs: check-status
if: ${{ needs.check-status.outputs.is-plugin-update == 'true' }}
name: Create Tag and Draft Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build, Tag & Release
uses: pantheon-systems/plugin-release-actions/build-tag-release@main
with:
gh_token: ${{ github.token }}
readme_md: README.md
28 changes: 28 additions & 0 deletions .github/workflows/composer-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Composer Diff
on:
pull_request:
paths:
- 'composer.lock'
permissions:
contents: write
pull-requests: write
jobs:
composer-diff:
name: Composer Diff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate composer diff
id: composer_diff
uses: IonBazan/composer-diff-action@v1
- uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
with:
header: composer-diff
message: |
<strong>Composer Changes</strong>

${{ steps.composer_diff.outputs.composer_diff }}
32 changes: 23 additions & 9 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
name: Linting & Test
on: [push]
permissions:
contents: read
on:
schedule:
- cron: '0 0 * * *'
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- '**'

jobs:
validate-readme-spacing:
name: Validate README Spacing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pantheon-systems/validate-readme-spacing@v1
lint:
name: PHPCS Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
Expand All @@ -33,17 +46,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pantheon-systems/phpcompatibility-action@dev
with:
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php
test-versions: 8.0-
test-versions: 8.3-
wporg-validation:
name: WP.org Plugin Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pantheon-systems/action-wporg-validator@1.0.0
with:
type: 'plugin'
Expand All @@ -54,13 +67,11 @@ jobs:
services:
mariadb:
image: mariadb:10.6
env:
MYSQL_ROOT_PASSWORD: ""
strategy:
matrix:
php_version: [7.4, 8.2, 8.3, 8.4]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -83,9 +94,12 @@ jobs:
path: ~/vendor
key: test-dependencies-{{ checksum "composer.json" }}
restore-keys: test-dependencies-{{ checksum "composer.json" }}
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install dependencies
run: |
if [ ${{ matrix.php_version }} = "7.4" ]; then
composer require pantheon-systems/pantheon-wp-coding-standards:^2 --no-update
composer update
fi
composer install
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Draft Release PR
on:
push:
branches:
- develop

permissions:
pull-requests: write
contents: write

jobs:
draft-release:
name: Draft Release PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Draft Release PR
uses: pantheon-systems/plugin-release-actions/release-pr@main
with:
gh_token: ${{ github.token }}
readme_md: README.md
14 changes: 0 additions & 14 deletions .github/workflows/shellcheck.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/wordpress-plugin-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Subversion
run: |
sudo apt-get update
sudo apt-get install subversion
svn --version
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@2.1.1
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vendor/
bin/install-local-tests.sh
bin/install-wp-tests.sh
bin/phpunit-test.sh
bin/helpers.sh
31 changes: 18 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You may notice there are two sets of tests running, on two different services:

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`.
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 `composer test:install:withdb`. Otherwise, you can install the test suite with `composer test:install`, and run the tests with `composer test`.

Behat requires a Pantheon site. 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.

Expand All @@ -31,19 +31,11 @@ The `release` branch matches the latest stable release deployed to [wp.org](wp.o

## Release Process

1. From `main`, 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 `pantheon-sessions.php`.
* Add the date to the "X.Y.X" heading in the changelog
* 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`. Copy the changelog for the current release to the PR body.
1. After all tests pass and you have received approval from a [CODEOWNER](./CODEOWNERS), merge the PR into `release`. "Rebase and merge" is preferred in this case. _Never_ squash to `release`.
1. Pull `release` 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`).
* `git tag X.Y.Z`
* `git push --tags`
1. Merge your feature branch into `develop` with a PR. This PR should include any necessary updates to the changelog in readme.txt and README.md.
1. A draft release PR will be generated by the [`release-pr`](https://github.com/pantheon-systems/pantheon-advanced-page-cache/actions/workflows/release-pr.yml) action. This PR needs to be switched to Ready to Review so automated testing will run.
1. After merging the release PR to the `release` branch, a draft Release will be automatically be created by the [`build-tag-release`](https://github.com/pantheon-systems/pantheon-advanced-page-cache/actions/workflows/build-tag-release.yml) workflow. This draft release will be automatically pre-filled with release notes.
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-native-php-sessions/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. Review the release notes making any necessary changes and publish the release.
1. Wait for the [_Release wp-native-php-sessions plugin to wp.org_ action](https://github.com/pantheon-systems/wp-native-php-sessions/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/native-php-sessions/). This may take a few minutes.
1. Following the release, prepare the next dev version with the following steps:
Expand All @@ -56,3 +48,16 @@ The `release` branch matches the latest stable release deployed to [wp.org](wp.o
* `git add -A .`
* `git commit -m "Prepare X.Y.X-dev"`
* `git push origin develop`

## Asset-only Releases
Thanks to [10up/action-wordpress-plugin-asset-update](https://github.com/10up/action-wordpress-plugin-asset-update/) we can make asset-only updates to WordPress.org without needing to create a new release. This is useful for updating the plugin banner, icon, screenshots or just updating the readme.txt.

Broadly the process for creating asset-only releases is as follows:

1. Branch off of `main` (not `develop`) and make your changes. Ensure that you are _only_ making changes to `readme.txt`/`readme.md` or files in the `.wordpress.org` directory. Some other changes (e.g. to `.gitignore` or `composer.json`) are allowed but any file changes to anything beyond those locations will trigger the release automation.
1. Push your branch to GitHub and open a PR against `main`.
1. Automation will trigger and create a new release branch in the repository. Because the version numbers have not changed, you will need to ensure that the version numbers in your branch are correct. If they are not, and a new branch was created automatically that drops the `-dev` suffix but contains the correct version number, you can merge that branch into your PR branch to update the version numbers, then close the release branch. A release PR will not be created because the diffs will not have changed.
1. Once the PR is merged, the asset update action will run and update the assets on WordPress.org.
1. Check out `develop` and merge `main` into it to ensure that the asset-only changes are included in the next release. Then update the version numbers again to re-add the `-dev` suffix.

**Note:** In the future we will work on making this process smoother and more automated.
Loading
Loading