Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test performance benchmark #38

Draft
wants to merge 15 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
44 changes: 44 additions & 0 deletions .github/workflows/performance-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Performance Benchmark

on:
push:
branches:
- smoke-testing
pull_request:
branches:
- trunk

jobs:
performance:
name: 'Run tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup proper PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Node install
run: npm ci

- name: Build
run: npm run build

- name: Run performance tests
uses: swissspidy/wp-performance-action@v2
mukeshpanchal27 marked this conversation as resolved.
Show resolved Hide resolved
with:
urls: |
/
/wp-admin/
blueprint: './.github/workflows/performance-blueprint.json'
iterations: 5
repetitions: 1
45 changes: 45 additions & 0 deletions .github/workflows/performance-blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"plugins": [
"woocommerce",
"email-log"
],
"extraLibraries": [
"wp-cli"
],
"steps": [
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG": true,
"WP_CACHE": true
}
},
{
"step": "activatePlugin",
"pluginName": "WooCommerce",
"pluginPath": "/wordpress/wp-content/plugins/woocommerce"
},
{
"step": "activatePlugin",
"pluginName": "Email Log",
"pluginPath": "/wordpress/wp-content/plugins/email-log"
},
{
"step": "installTheme",
"themeData": {
mukeshpanchal27 marked this conversation as resolved.
Show resolved Hide resolved
"resource": "url",
"url": "https://downloads.wordpress.org/theme/storefront.zip"
},
"ifAlreadyInstalled": "skip",
"options": {
"activate": true,
"importStarterContent": false
}
},
{
"step": "login",
"username": "admin"
}
]
}
Loading