Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Files and directories excluded from the distributable plugin archive.
# This file documents what does NOT ship to end users.

# Version control
.git
.gitignore
.gitkeep

# CI / development infrastructure
.github
.dev
.claude
.idea
.vscode
.worktrees
.dockerignore
.phpunit.result.cache
.DS_Store

# Documentation (readme.txt is the WP standard)
docs
CONTRIBUTORS.md
AGENTS.md
CLAUDE.md
README.md

# Build tooling
bin
Makefile
composer.lock
phpcs.xml
phpunit.xml.dist

# Node.js / Playwright (e2e only)
node_modules
package.json
package-lock.json
tsconfig.json
playwright.config.ts
test-results
playwright-report

# Build config (source and compiled blocks both ship)
webpack.config.js

# Build output
builds

# Tests
tests
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug Report
description: Something isn't working as expected
labels: [bug, triage]

body:
- type: input
id: plugin-version
attributes:
label: Plugin version
placeholder: "0.2.4"
validations:
required: true

- type: input
id: wp-version
attributes:
label: WordPress version
placeholder: "6.8"
validations:
required: true

- type: input
id: php-version
attributes:
label: PHP version
placeholder: "8.3"
validations:
required: true

- type: textarea
id: description
attributes:
label: What happened?
description: A clear description of the bug.
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Go to '...'
2. Click '...'
3. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant logs or screenshots
description: Paste any error messages, stack traces, or screenshots.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false

contact_links:
- name: WordPress Support Forum
url: https://wordpress.org/support/plugin/airo-wp/
about: Ask questions and get community support
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature Request
description: Suggest a new feature or improvement
labels: [enhancement]

body:
- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: A clear description of the problem or use case driving this request.
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: Describe what you'd like to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Any other approaches you've thought about and why you ruled them out.

- type: textarea
id: context
attributes:
label: Additional context
description: Mockups, references, or anything else that helps.
92 changes: 92 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: CI

# PR gate: all four jobs run natively on ubuntu-24.04 — no Docker, no make.
# PHP 7.4 / WP 7.0 on PRs guards the plugin's hard PHP 7.4 compatibility requirement.

on:
pull_request:
branches: [main, 'feature/**', 'fix/**']
push:
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
lint:
name: PHPCS
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up toolchain
run: sh scripts/setup/unit.sh
env:
PHP_VERSION: '7.4'
- name: Run PHPCS
run: sh scripts/tests/lint.sh

unit:
name: PHPUnit
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up toolchain
run: sh scripts/setup/unit.sh
env:
PHP_VERSION: '7.4'
- name: Run PHPUnit
run: sh scripts/tests/unit.sh

test-e2e:
name: Functional E2E
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up e2e environment
run: sh scripts/setup/e2e.sh
env:
PHP_VERSION: '7.4'
WP_VERSION: '7.0'
- name: Run functional e2e suite
run: sh scripts/tests/e2e.sh
env:
PHP_VERSION: '7.4'
WP_VERSION: '7.0'
- name: Upload Playwright report on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 7

check-plugin:
name: Plugin Check (PCP)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up e2e environment
run: sh scripts/setup/e2e.sh
env:
PHP_VERSION: '7.4'
WP_VERSION: '7.0'
- name: Run Plugin Check suite
run: sh scripts/tests/plugin-check.sh
env:
PHP_VERSION: '7.4'
WP_VERSION: '7.0'
- name: Post Plugin Check results as PR comment
if: always() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
path: builds/plugin-check-results.txt
- name: Upload Plugin Check results on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: plugin-check-results
path: builds/plugin-check-results.txt
retention-days: 7
118 changes: 118 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Pre-release

# Full PHP × WP matrix sweep.
# Triggers automatically on release/* PRs to main; also runnable manually.

on:
workflow_dispatch:
inputs:
php_version:
description: 'PHP version to test, or "all"'
default: 'all'
wp_version:
description: 'WP version to test, or "all"'
default: 'all'
pull_request:
branches: [main]

jobs:
matrix-setup:
name: Build matrix
runs-on: ubuntu-24.04
if: startsWith(github.head_ref, 'release/') || github.event_name == 'workflow_dispatch'
outputs:
php: ${{ steps.set.outputs.php }}
wp: ${{ steps.set.outputs.wp }}
steps:
- id: set
run: |
if [ -z "${{ inputs.php_version }}" ] || [ "${{ inputs.php_version }}" = "all" ]; then
echo 'php=["7.4","8.0","8.1","8.2","8.3"]' >> $GITHUB_OUTPUT
else
echo 'php=["${{ inputs.php_version }}"]' >> $GITHUB_OUTPUT
fi
if [ -z "${{ inputs.wp_version }}" ] || [ "${{ inputs.wp_version }}" = "all" ]; then
echo 'wp=["6.8","6.9","7.0"]' >> $GITHUB_OUTPUT
else
echo 'wp=["${{ inputs.wp_version }}"]' >> $GITHUB_OUTPUT
fi

lint:
name: PHPCS (PHP 8.3)
runs-on: ubuntu-24.04
if: startsWith(github.head_ref, 'release/') || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- run: sh scripts/setup/unit.sh
env:
PHP_VERSION: '8.3'
- run: sh scripts/tests/lint.sh

unit:
name: PHPUnit (PHP ${{ matrix.php }})
needs: matrix-setup
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.matrix-setup.outputs.php) }}
steps:
- uses: actions/checkout@v4
- run: sh scripts/setup/unit.sh
env:
PHP_VERSION: ${{ matrix.php }}
- run: sh scripts/tests/unit.sh

test-e2e:
name: E2E (PHP ${{ matrix.php }} × WP ${{ matrix.wp }})
needs: matrix-setup
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.matrix-setup.outputs.php) }}
wp: ${{ fromJson(needs.matrix-setup.outputs.wp) }}
steps:
- uses: actions/checkout@v4
- run: sh scripts/setup/e2e.sh
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wp }}
- run: sh scripts/tests/e2e.sh
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wp }}
- if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report-php${{ matrix.php }}-wp${{ matrix.wp }}
path: |
playwright-report/
test-results/
retention-days: 7

check-plugin:
name: Plugin Check (PHP ${{ matrix.php }} × WP ${{ matrix.wp }})
needs: matrix-setup
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.matrix-setup.outputs.php) }}
wp: ${{ fromJson(needs.matrix-setup.outputs.wp) }}
steps:
- uses: actions/checkout@v4
- run: sh scripts/setup/e2e.sh
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wp }}
- run: sh scripts/tests/plugin-check.sh
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wp }}
- if: failure()
uses: actions/upload-artifact@v4
with:
name: plugin-check-php${{ matrix.php }}-wp${{ matrix.wp }}
path: builds/plugin-check-results.txt
retention-days: 7
14 changes: 14 additions & 0 deletions .github/workflows/publish-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Plugin

on:
workflow_dispatch:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+']

jobs:
publish:
name: Publish to WordPress.org
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Loading
Loading