Skip to content

Commit 3964e54

Browse files
committed
chore: simulate performance test
1 parent 07dbff5 commit 3964e54

File tree

4 files changed

+14
-96
lines changed

4 files changed

+14
-96
lines changed

.github/workflows/test-actions.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ jobs:
3737
env: 'testing'
3838
enable-svg-upload: true
3939
experiments: |-
40-
pages_panel:true
41-
editor_v2:false
40+
e_atomic_elements:true
4241
templates: |-
4342
elementor-templates
4443
@@ -48,21 +47,27 @@ jobs:
4847
with:
4948
number-of-runs: 3
5049
urls: |-
51-
rquth:http://localhost:8889/react-query-under-the-hood/
50+
mixed:http://localhost:8889/mixed-template/
51+
v3:http://localhost:8889/v3-only/
5252
categories: |-
5353
performance
5454
5555
- name: Check if score meets the threshold
5656
uses: actions/github-script@v7
5757
env:
58-
PERFORMANCE_SCORE: ${{ steps.run-lighthouse-tests.outputs.rquth-performance-median-score }}
58+
MIXED_PERFORMANCE_SCORE: ${{ steps.run-lighthouse-tests.outputs.mixed-performance-median-score }}
59+
V3_PERFORMANCE_SCORE: ${{ steps.run-lighthouse-tests.outputs.v3-performance-median-score }}
5960
THRESHOLD: 0.70
6061
with:
6162
script: |
62-
const { PERFORMANCE_SCORE, THRESHOLD } = process.env;
63+
const { MIXED_PERFORMANCE_SCORE, V3_PERFORMANCE_SCORE, THRESHOLD } = process.env;
6364
64-
if (PERFORMANCE_SCORE < THRESHOLD) {
65-
core.setFailed(`Performance score is ${PERFORMANCE_SCORE}, which is below the threshold of ${threshold}.`);
65+
if (MIXED_PERFORMANCE_SCORE < THRESHOLD) {
66+
throw new Error(`Mixed template performance score ${MIXED_PERFORMANCE_SCORE} is below the threshold ${THRESHOLD}`);
67+
}
68+
69+
if (MIXED_PERFORMANCE_SCORE >= V3_PERFORMANCE_SCORE) {
70+
throw new Error(`Mixed template performance score ${MIXED_PERFORMANCE_SCORE} is not greater than V3 template performance score ${V3_PERFORMANCE_SCORE}`);
6671
}
6772
6873
- name: Upload reports

stubs/elementor-templates/mixed.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

stubs/elementor-templates/test.json

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

stubs/elementor-templates/v3.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)