Skip to content

Commit bbdd8b0

Browse files
committed
Merge branch 'develop' into fix/3557-hero-alignment
2 parents 2a4a31d + 3154353 commit bbdd8b0

235 files changed

Lines changed: 14841 additions & 15986 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: review-release
3+
description: >-
4+
Review Stackable release-ready zip diffs against the current changelog.
5+
Use when the user invokes /review-release, after npm run release:ready,
6+
or when judging Freemius FREE/PAID zips before a release.
7+
disable-model-invocation: true
8+
---
9+
10+
# Review release
11+
12+
Judge the artifacts from `npm run release:ready`.
13+
Do not rebuild, re-upload, unzip, or re-diff.
14+
Do not edit plugin files.
15+
Do not write a verdict file.
16+
Print the full review to the terminal.
17+
18+
## Inputs
19+
20+
1. Read only the `= {version} =` section in repo `readme.txt`.
21+
`{version}` is the `Version:` header in `plugin.php`.
22+
Ignore older changelog sections.
23+
2. Read these files under `build/release-ready/`:
24+
- `free.source.diff`
25+
- `free.sizes.json`
26+
- `free.tree.txt`
27+
- `paid.source.diff`
28+
- `paid.sizes.json`
29+
- `paid.tree.txt`
30+
3. Open each unpacked zip's `readme.txt` / plugin header only to confirm `Version` / `Stable tag` match `{version}`.
31+
Do not use older changelog sections from those files.
32+
33+
FREE baseline is the WordPress.org zip (unpacked under `unpacked/wporg`).
34+
PAID baseline is the previous released Freemius paid zip (`unpacked/paid-prev`).
35+
36+
## How to judge
37+
38+
Read the current changelog section first.
39+
Every source hunk should map to a changelog line, or be Freemius-processor noise (SDK path, contributor, license comments), or get flagged.
40+
41+
Compiled files (`dist/**/*.js`, `dist/**/*.css`, images, fonts, maps) are size-only in `*.sizes.json`.
42+
Do not read compiled diffs.
43+
Flag a compiled row when `flag` is true (absolute delta over 200KB or over 50%, or the file appeared or disappeared).
44+
45+
Lost files, unexpected libraries, new vendor-looking dirs, and new security surface are findings.
46+
Security surface includes unescaped output, new REST or AJAX, a new remote URL, or a loosened capability check.
47+
48+
FREE zip must stay Directory-safe:
49+
- no `pro__premium_only/`
50+
- `STACKABLE_BUILD` is `free`
51+
- no premium-only strings that should have been stripped
52+
53+
PAID zip should keep premium files the previous paid zip had, plus changelog-justified additions.
54+
55+
## Output
56+
57+
Print a verbose review to the terminal, in this order:
58+
59+
1. Version
60+
2. Changelog used (the current section only)
61+
3. FREE findings
62+
4. PAID findings
63+
5. Compiled size flags
64+
6. Final line: `GREEN LIGHT` or `BLOCKED` plus a one-line reason

‎.env.example‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎.github/workflows/compressed-diff.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ jobs:
1919
- name: Install Composer Dependencies
2020
run: |
2121
composer install --prefer-dist --no-progress --ignore-platform-reqs
22-
- name: Setup Node # Fix because we can't do npm ci --legacy-peer-deps
23-
uses: actions/setup-node@v1
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: 14.x
25+
node-version: lts/*
2626
- uses: preactjs/compressed-size-action@v2
2727
with:
2828
repo-token: "${{ secrets.GITHUB_TOKEN }}"
29+
install-script: "npm ci --legacy-peer-deps"
2930
build-script: "build:no-translate"
3031
clean-script: "clean"
3132
pattern: "./build/stackable/**"

‎.github/workflows/e2e-tests.yml‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master, develop ]
8+
9+
# One run per PR or branch. A new push cancels the previous run.
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
cache: npm
23+
cache-dependency-path: package-lock.json
24+
- name: Build Stackable Free Plugin
25+
run: |
26+
npm ci --legacy-peer-deps
27+
npm run build:e2e
28+
- name: Archive plugin build
29+
run: tar --exclude=./node_modules --exclude=./.git -czf /tmp/stackable-e2e-build.tar.gz .
30+
- uses: actions/upload-artifact@v4
31+
with:
32+
name: stackable-e2e-build
33+
path: /tmp/stackable-e2e-build.tar.gz
34+
retention-days: 1
35+
36+
test:
37+
needs: build
38+
timeout-minutes: 60
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
include:
44+
# stackable-playwright-matrix-start
45+
- php_version: '8.5'
46+
wp_version: '7.1'
47+
- php_version: '7.4'
48+
wp_version: '6.9'
49+
# stackable-playwright-matrix-end
50+
name: Free e2e PHP ${{ matrix.php_version }} WP ${{ matrix.wp_version }}
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version: lts/*
56+
cache: npm
57+
cache-dependency-path: package-lock.json
58+
- name: Restore plugin build
59+
uses: actions/download-artifact@v4
60+
with:
61+
name: stackable-e2e-build
62+
- name: Extract plugin build
63+
run: tar -xzf stackable-e2e-build.tar.gz
64+
- name: Install dependencies
65+
run: npm ci --legacy-peer-deps
66+
- name: Set the version suffix for the output
67+
run: echo VERSION_SUFFIX=${GITHUB_REF_NAME//\//-} >> $GITHUB_ENV
68+
- name: Cache Playwright Browsers
69+
uses: actions/cache@v4
70+
with:
71+
path: ~/.cache/ms-playwright
72+
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
73+
restore-keys: |
74+
${{ runner.os }}-playwright-
75+
- name: Install Playwright Browsers
76+
timeout-minutes: 15
77+
run: |
78+
for attempt in 1 2 3; do
79+
npx playwright install chromium --with-deps && exit 0
80+
echo "Playwright install failed on attempt $attempt"
81+
sleep $((attempt * 30))
82+
done
83+
exit 1
84+
- name: Run free Playwright e2e suite
85+
id: run-playwright-tests
86+
env:
87+
WP_PHP_VERSION: ${{ matrix.php_version }}
88+
WP_VERSION: ${{ matrix.wp_version }}
89+
run: npm run test:e2e
90+
- uses: actions/upload-artifact@v4
91+
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
92+
id: artifact-upload-step
93+
with:
94+
name: playwright-report-php_${{ matrix.php_version }}-wp_${{ matrix.wp_version }}-${{ env.VERSION_SUFFIX }}
95+
path: playwright-report/
96+
overwrite: true
97+
retention-days: 30
98+
- uses: markpatterson27/markdown-to-output@v1
99+
id: mto
100+
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
101+
with:
102+
filepath: ./playwright-stk/errors.md
103+
- name: Add test results to summary
104+
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
105+
run: |
106+
echo "${{ steps.mto.outputs.body }}" >> $GITHUB_STEP_SUMMARY
107+
echo "Report: [playwright-report-php_${{ matrix.php_version }}-wp_${{ matrix.wp_version }}-${{ env.VERSION_SUFFIX }}.zip](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }})" >> $GITHUB_STEP_SUMMARY

‎.github/workflows/js-unit.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: JS Unit
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
paths:
7+
- 'src/**/*.js'
8+
- 'jest.config.js'
9+
- 'package.json'
10+
- 'package-lock.json'
11+
- '.github/workflows/js-unit.yml'
12+
pull_request:
13+
branches: [ master, develop ]
14+
paths:
15+
- 'src/**/*.js'
16+
- 'jest.config.js'
17+
- 'package.json'
18+
- 'package-lock.json'
19+
- '.github/workflows/js-unit.yml'
20+
21+
# One run per PR or branch. A new push cancels the previous run.
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
unit:
28+
name: Jest
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: lts/*
35+
cache: npm
36+
cache-dependency-path: package-lock.json
37+
- name: Install npm dependencies
38+
run: npm ci --legacy-peer-deps
39+
- name: Run unit tests
40+
run: npm run test:unit
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PHP Compatibility
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
paths:
7+
- '**.php'
8+
- 'composer.json'
9+
- 'phpcs.xml.dist'
10+
- '.github/workflows/php-compatibility.yml'
11+
pull_request:
12+
branches: [ master, develop ]
13+
paths:
14+
- '**.php'
15+
- 'composer.json'
16+
- 'phpcs.xml.dist'
17+
- '.github/workflows/php-compatibility.yml'
18+
19+
# One run per PR or branch. A new push cancels the previous run.
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
phpcompat:
26+
name: PHPCompatibilityWP
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: '8.3'
33+
coverage: none
34+
tools: composer:v2
35+
- name: Install Composer dependencies
36+
run: composer update --no-interaction --prefer-dist --no-progress
37+
- name: Run PHPCompatibilityWP
38+
run: vendor/bin/phpcs

‎.github/workflows/php-unit.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: PHP Unit
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
paths:
7+
- '**.php'
8+
- 'composer.json'
9+
- 'phpunit.xml.dist'
10+
- 'tests/phpunit/**'
11+
- '.github/workflows/php-unit.yml'
12+
pull_request:
13+
branches: [ master, develop ]
14+
paths:
15+
- '**.php'
16+
- 'composer.json'
17+
- 'phpunit.xml.dist'
18+
- 'tests/phpunit/**'
19+
- '.github/workflows/php-unit.yml'
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
phpunit:
27+
name: PHPUnit PHP ${{ matrix.php_version }}
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
php_version: [ '7.4', '8.5' ]
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php_version }}
38+
coverage: none
39+
tools: composer:v2
40+
- name: Install Composer dependencies
41+
run: composer update --no-interaction --prefer-dist --no-progress
42+
- name: Run PHPUnit
43+
run: composer test

0 commit comments

Comments
 (0)