Skip to content

Commit

Permalink
Merge pull request #20 from alleyinteractive/feature/type
Browse files Browse the repository at this point in the history
Upgrade plugin
  • Loading branch information
srtfisher authored Dec 6, 2024
2 parents 63330a1 + be47048 commit fe1fbc9
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 494 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/all-pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "All Pull Request Tests"

on:
pull_request:
branches:
- develop
types: [opened, synchronize, reopened, ready_for_review]

jobs:
# We use a single job to ensure that all steps run in the same environment and
# reduce the number of minutes used.
pr-tests:
# Don't run on draft PRs
if: github.event.pull_request.draft == false
# Timeout after 10 minutes
timeout-minutes: 10
# Define a matrix of PHP/WordPress versions to test against
strategy:
matrix:
php: [8.1, 8.2, 8.3]
wordpress: ["latest"]
runs-on: ubuntu-latest
# Cancel any existing runs of this workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}
cancel-in-progress: true
# Name the job in the matrix
name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }}"
steps:
- uses: actions/checkout@v4

- name: Run General Tests
# See https://github.com/alleyinteractive/action-test-general for more options
uses: alleyinteractive/action-test-general@develop

- name: Run PHP Tests
# See https://github.com/alleyinteractive/action-test-php for more options
uses: alleyinteractive/action-test-php@develop
with:
php-version: '${{ matrix.php }}'
wordpress-version: '${{ matrix.wordpress }}'
skip-wordpress-install: 'true'
# This required job ensures that all PR checks have passed before merging.
all-pr-checks-passed:
name: All PR checks passed
needs:
- pr-tests
runs-on: ubuntu-latest
if: always()
steps:
- name: Check job statuses
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
echo "One or more jobs failed"
exit 1
elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs were cancelled"
exit 1
else
echo "All jobs passed or were skipped"
exit 0
fi
15 changes: 10 additions & 5 deletions .github/workflows/built-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Built Release
name: Built Branch and Release

on:
push:
Expand All @@ -7,8 +7,13 @@ on:
- main
- production

permissions:
contents: write

jobs:
built-release:
uses: alleyinteractive/.github/.github/workflows/built-release.yml@main
with:
node: 20
release:
name: "Built Branch and Release"
runs-on: ubuntu-latest
if: github.repository != 'alleyinteractive/create-wordpress-plugin'
steps:
- uses: alleyinteractive/action-release@develop
16 changes: 0 additions & 16 deletions .github/workflows/coding-quality.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/coding-standards.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/unit-test.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/update-changelog.yml

This file was deleted.

4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

All notable changes to `WP 404 Caching` will be documented in this file.

## 1.0.4 Unpublished
## 1.1.0

- Drop requirement for `alleyinteractive/wp-type-extensions`.
- Drop `wp_404_caching_features` filter.
- Github Action: add support for the memcached service;
- Github Action: test against PHP 8.3

Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# WP 404 Caching

[![Coding Standards](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/coding-standards.yml)
[![Testing Suite](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/unit-test.yml)
[![All Pull Request Tests](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/all-pr-tests.yml/badge.svg)](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/all-pr-tests.yml)

A WordPress plugin to provide full page caching for 404 pages, improving performance and reducing server load.

- **Contributors**: alleyinteractive
- **Tags**: alleyinteractive, wp-404-caching
- **Stable tag**: 1.0.3

## Requirements

- SSL enabled on the website.
- An external object cache setup (e.g., Redis, Memcached).
- Requires at least: 6.3
Expand All @@ -34,6 +30,7 @@ The plugin uses a dual regular/stale caching strategy to minimize cache misses.
- Ensures compatibility with analytics by replacing the "guaranteed 404 URI" with the actual requested URI in the cached page

## Installation

### Via Composer (recommeded):

You can install the package via composer:
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
],
"require": {
"php": "^8.1",
"alleyinteractive/composer-wordpress-autoloader": "^1.0",
"alleyinteractive/wp-type-extensions": "^2.1"
},
"require-dev": {
"alleyinteractive/composer-wordpress-autoloader": "^1.0"
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^2.0",
"mantle-framework/testkit": "^1.0",
"szepeviktor/phpstan-wordpress": "^1.1"
Expand Down
129 changes: 0 additions & 129 deletions src/assets.php

This file was deleted.

Loading

0 comments on commit fe1fbc9

Please sign in to comment.