Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
6bac5d5
gh actions
osbre Apr 14, 2025
6a7bebb
gh
osbre Apr 14, 2025
232f8a8
Tests
osbre May 5, 2025
b352151
Tests
osbre May 5, 2025
9abc618
Tests
osbre May 5, 2025
2f4e920
Tests
osbre May 5, 2025
b36fb74
Tests
osbre May 5, 2025
ea64fca
Tests
osbre May 5, 2025
095b385
Tests
osbre May 5, 2025
809ee65
wip
osbre May 5, 2025
d491144
Tests
osbre May 5, 2025
40cc2f5
wip
osbre Jul 12, 2025
4eb627b
Merge remote-tracking branch 'origin/master' into feat/automated-brow…
osbre Oct 12, 2025
461f811
deps
osbre Oct 13, 2025
4cf8750
wip
osbre Oct 13, 2025
e5bc7f7
wip
osbre Oct 14, 2025
af4a5bd
wip
osbre Oct 14, 2025
032bafb
wip
osbre Oct 14, 2025
63cea2b
wip
osbre Oct 14, 2025
c437613
wip
osbre Oct 14, 2025
0c99be1
wip
osbre Oct 14, 2025
2281be0
wip
osbre Oct 14, 2025
18b6af3
wip
osbre Oct 14, 2025
47b9e58
wip
osbre Oct 14, 2025
2bdab97
wip
osbre Oct 14, 2025
00c73d6
wip
osbre Oct 14, 2025
1d66d42
wip
osbre Oct 14, 2025
22e31b0
wip
osbre Oct 14, 2025
1275003
wip
osbre Oct 14, 2025
ccb8064
wip
osbre Oct 14, 2025
95244ac
wip
osbre Oct 15, 2025
1f3bcfb
deps
osbre Oct 28, 2025
2bf491b
wip
osbre Oct 28, 2025
75ca7d5
wip
osbre Oct 28, 2025
2e3f7a1
wip
osbre Oct 28, 2025
55cf64d
wip
osbre Oct 28, 2025
3f3f5b7
wip
osbre Oct 28, 2025
a86a7cb
wip
osbre Oct 28, 2025
baf678c
wip
osbre Oct 30, 2025
448c039
wip
osbre Oct 30, 2025
3f6db8a
wip
osbre Oct 30, 2025
59ed5b6
wip
osbre Oct 31, 2025
cc71bd0
wip
osbre Oct 31, 2025
797144f
wip
osbre Oct 31, 2025
13736fd
wip
osbre Oct 31, 2025
9b3031f
wip
osbre Oct 31, 2025
9736c9b
chromium only
osbre Oct 31, 2025
17e3f7b
wip
osbre Oct 31, 2025
504d66f
wip
osbre Oct 31, 2025
d2138ad
Refactor
osbre Oct 31, 2025
87918a3
fix
osbre Oct 31, 2025
10219e1
Merge remote-tracking branch 'origin/master' into feat/automated-brow…
osbre Oct 31, 2025
abece7c
fix
osbre Oct 31, 2025
bc45709
wip
osbre Oct 31, 2025
509aab5
wip
osbre Oct 31, 2025
d0b5053
clarify
osbre Oct 31, 2025
7876295
fix
osbre Oct 31, 2025
e1ac806
wip
osbre Oct 31, 2025
efdada9
fix
osbre Oct 31, 2025
0738fba
wip
osbre Oct 31, 2025
9be4526
wip
osbre Oct 31, 2025
9fef902
custom domain
osbre Oct 31, 2025
9e352d5
typo
osbre Oct 31, 2025
48aa631
wip
osbre Oct 31, 2025
29ef711
wip
osbre Oct 31, 2025
76166a8
wip
osbre Oct 31, 2025
248d70e
wip
osbre Oct 31, 2025
f1efa1d
wip
osbre Oct 31, 2025
2f224d1
wip
osbre Oct 31, 2025
9588940
wip
osbre Oct 31, 2025
6b5c935
wip
osbre Oct 31, 2025
873043a
wip
osbre Oct 31, 2025
ec1e164
wip
osbre Oct 31, 2025
cc6a48e
wip
osbre Oct 31, 2025
09210ee
wip
osbre Oct 31, 2025
759c27b
wip
osbre Oct 31, 2025
77c2c40
wip
osbre Oct 31, 2025
0b2a8d6
wip
osbre Oct 31, 2025
cebd00a
wip
osbre Oct 31, 2025
e19411a
wip
osbre Oct 31, 2025
7202873
wip
osbre Oct 31, 2025
42760e7
wip
osbre Oct 31, 2025
eac5669
wip
osbre Nov 1, 2025
ec5ae4e
wip
osbre Nov 1, 2025
609c6db
wip
osbre Nov 1, 2025
702e76c
wip
osbre Nov 1, 2025
61747d5
deps
osbre Nov 1, 2025
5187353
wip
osbre Nov 1, 2025
1647b30
wip
osbre Nov 1, 2025
e5ab0c7
wip
osbre Nov 1, 2025
e548cfe
wip
osbre Nov 1, 2025
f477353
wip
osbre Nov 1, 2025
950eee5
wip
osbre Nov 1, 2025
06c0722
wip
osbre Nov 1, 2025
94cd4d7
wip
osbre Nov 1, 2025
c52dbd3
wip
osbre Nov 1, 2025
e4ec3c7
wip
osbre Nov 1, 2025
5f850c8
wip
osbre Nov 1, 2025
01e2e8e
wip
osbre Nov 1, 2025
ee823a9
wip
osbre Nov 1, 2025
062cee2
wip
osbre Nov 1, 2025
288af21
wip
osbre Nov 1, 2025
02c4a15
wip
osbre Nov 1, 2025
8bd3b9a
wip
osbre Nov 1, 2025
a2712ab
wip
osbre Nov 1, 2025
26333c7
wip
osbre Nov 1, 2025
d810ec3
wip
osbre Nov 1, 2025
1f8eca8
wip
osbre Nov 1, 2025
ab35e08
wip
osbre Nov 1, 2025
d32b46e
wip
osbre Nov 1, 2025
c4f3d91
wip
osbre Nov 1, 2025
faa0ae2
wip
osbre Nov 1, 2025
afd5ccb
docker build
osbre Nov 1, 2025
8fae523
docker build
osbre Nov 1, 2025
db5b27d
docker build
osbre Nov 1, 2025
73f8597
docker build
osbre Nov 1, 2025
56fb7a2
docker build
osbre Nov 1, 2025
3e6bf96
docker build
osbre Nov 1, 2025
06b6b47
docker build
osbre Nov 1, 2025
35abb78
wip
osbre Nov 1, 2025
431244b
wip
osbre Nov 1, 2025
5116c32
wip
osbre Nov 1, 2025
808c0e8
wip
osbre Nov 1, 2025
c78b773
wip
osbre Nov 1, 2025
f4a5291
wip
osbre Nov 1, 2025
5e2c9d2
wip
osbre Nov 1, 2025
eb52920
wip
osbre Nov 1, 2025
fc5f5ba
wip
osbre Nov 1, 2025
cb53fbf
wip
osbre Nov 1, 2025
01e5107
wip
osbre Nov 1, 2025
1f0fe03
wip
osbre Nov 1, 2025
327ec18
wip
osbre Nov 1, 2025
39264ac
wip
osbre Nov 1, 2025
7bf690d
wip
osbre Nov 2, 2025
08255f5
wip
osbre Nov 2, 2025
fa6d90d
inc timeout
osbre Nov 2, 2025
dc5c6b9
wip
osbre Nov 2, 2025
4b42108
wip
osbre Nov 2, 2025
7f50e14
wip
osbre Nov 2, 2025
a1aeb6e
wip
osbre Nov 2, 2025
8e4229a
wip
osbre Nov 2, 2025
95d9c0e
wip
osbre Nov 2, 2025
0a7abed
wip
osbre Nov 2, 2025
407f598
move from pestphp to zenstruck/browser
osbre Nov 3, 2025
b9f72fa
wip
osbre Nov 3, 2025
a38768f
wip
osbre Nov 4, 2025
afd5b27
wip
osbre Nov 4, 2025
bc860a4
wip
osbre Nov 4, 2025
219d96e
wip
osbre Nov 4, 2025
5b23f49
wip
osbre Nov 4, 2025
a1ea9a6
wip
osbre Nov 4, 2025
75d5fe7
wip
osbre Nov 4, 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
22 changes: 22 additions & 0 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG PHP_VERSION=8.4
FROM dunglas/frankenphp:1.9-php${PHP_VERSION}

RUN install-php-extensions \
bcmath \
exif \
gd \
intl \
mbstring \
mysqli \
opcache \
pdo_mysql \
zip \
curl \
xml \
dom \
simplexml \
tokenizer \
json \
fileinfo \
sockets \
imagick
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 10

- name: Install Node.js LTS
uses: actions/setup-node@v4
Expand Down
174 changes: 174 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: E2E Tests

on:
push:
pull_request:

jobs:
e2e:
name: PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# php: [ '7.4', '8.0', '8.1', '8.2' ]
php: [ '8.2', '8.3', '8.4' ]
# wordpress: [ '5.9', '6.0', '6.3', '6.7', '6.8' ]
wordpress: [ '6.7', '6.8' ]
exclude:
# Exclude older PHP versions with newer WordPress
- php: '7.4'
wordpress: '6.5.3'

services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: root
ports: [ 3306:3306 ]
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
WP_VERSION: ${{ matrix.wordpress }}
WP_SITE_URL: http://localhost:8100
WP_DB_NAME: wordpress
WP_DB_USER: root
WP_DB_PASS: root
WP_DB_HOST: 127.0.0.1

steps:
- name: Check MySQL tables
run: |
echo "Listing databases:"
mysql -h 127.0.0.1 -uroot -proot -e "SHOW DATABASES;"

echo "Checking if 'wordpress' database has any tables:"
mysql -h 127.0.0.1 -uroot -proot -D wordpress -e "SHOW TABLES;" || echo "No tables found (yet)."

- name: Checkout plugin
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
# Note: Specified version is only for running tests,
# as the WordPress PHP version is set inside the FrankenPHP Dockerfile.
php-version: 8.4
extensions: mysqli, zip, gd
coverage: none
tools: wp-cli

- name: Cache WordPress archive
id: cache-wordpress
uses: actions/cache@v3
with:
path: /tmp/wp
key: wp-${{ matrix.wordpress }}

- name: Download WordPress
if: steps.cache-wordpress.outputs.cache-hit != 'true'
run: |
mkdir -p /tmp/wp
curl -O https://wordpress.org/wordpress-${WP_VERSION}.tar.gz
tar -xzf wordpress-${WP_VERSION}.tar.gz --strip-components=1 -C /tmp/wp
rm wordpress-${WP_VERSION}.tar.gz

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build FrankenPHP image (with cache)
id: build
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
with:
context: .
file: .github/docker/Dockerfile
tags: frankenphp-${{ matrix.php }}
load: true
build-args: |
PHP_VERSION=${{ matrix.php }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Start FrankenPHP server
run: |
docker run -d \
--name frankenphp \
--network host \
-p 8100:8100 \
-v /tmp/wp:/var/www/html \
-v $GITHUB_WORKSPACE:/var/www/html/wp-content/plugins/simpleanalytics \
-v $GITHUB_WORKSPACE/Caddyfile:/etc/frankenphp/Caddyfile \
frankenphp-${{ matrix.php }}

- name: Install WordPress
run: |
rm -f /tmp/wp/wp-config.php
wp config create \
--dbname="$WP_DB_NAME" \
--dbuser="$WP_DB_USER" \
--dbpass="$WP_DB_PASS" \
--dbhost="$WP_DB_HOST" \
--path=/tmp/wp \
--skip-check
wp core install \
--url="${WP_SITE_URL}" \
--title="Test Site" \
--admin_user=admin \
--admin_password=admin \
--admin_email=test@example.com \
--path=/tmp/wp \
--skip-email \
--allow-root
wp user create author author@local.test --role=author --user_pass=author --path=/tmp/wp
wp user create editor editor@local.test --role=editor --user_pass=editor --path=/tmp/wp
wp user create subscriber subscriber@local.test --role=subscriber --user_pass=subscriber --path=/tmp/wp

- name: Show current config values
run: wp config list --path=/tmp/wp --allow-root

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"

- name: Install pnpm dependencies
run: pnpm install

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer install
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run Pest tests
run: ./vendor/bin/phpunit

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-php${{ matrix.php }}-wp${{ matrix.wordpress }}
path: var/browser
retention-days: 30

- name: Show FrankenPHP logs
if: always()
run: |
echo "=== FrankenPHP logs ==="
docker logs frankenphp || echo "No logs found"
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.svn
node*
vendor*
build
vendor/
node_modules/
.phpunit.result.cache
var
drivers
driver
19 changes: 19 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
local_certs
auto_https off
frankenphp
}

:8100 {
@static {
file
path *.avif *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.gpx
}
header @static Cache-Control max-age=5184000
root * /var/www/html/
encode br zstd gzip
php_server
log {
format console
}
}
16 changes: 15 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"require-dev": {
"rector/rector": "^1.2"
"rector/rector": "^1.2",
"zenstruck/browser": "^1.9",
"phpunit/phpunit": "^12",
"symfony/panther": "^2.2",
"dbrekelmans/bdi": "^1.4"
},
"autoload": {
"psr-4": {
"Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
Loading
Loading