Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Sep 25, 2024
1 parent 089fad3 commit 8652c37
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
iterations: 5
repetitions: 1
wp-version: 'latest'
print-results: false
upload-artifacts: false

- name: Run performance tests (after)
id: after
Expand Down
14 changes: 11 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ inputs:
description: 'Whether to create PR comments with performance results.'
required: false
default: ''
print-results:
description: 'Whether to add results to the workflow summary'
required: false
default: ''
upload-artifacts:
description: 'Whether to upload any artifacts'
required: false
default: ''
debug:
description: 'Whether to log additional debugging information.'
default: ${{ runner.debug == '1' }}
Expand Down Expand Up @@ -262,7 +270,7 @@ runs:
- name: Share raw results
id: share-results
run: echo "results=$WP_ARTIFACTS_PATH/performance-results.json" >> $GITHUB_OUTPUT
if: ${{ ( inputs.action == 'test' || inputs.action == 'merge' ) && ! inputs.shard }}
if: ${{ ( inputs.action == 'test' || inputs.action == 'merge' ) && ! inputs.shard && inputs.print-results != 'false' }}
env:
WP_ARTIFACTS_PATH: ${{ github.action_path }}/env/artifacts
shell: 'bash'
Expand All @@ -277,7 +285,7 @@ runs:

- name: Upload performance results
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ success() && ( inputs.action == 'test' || inputs.action == 'merge' ) && ! inputs.shard }}
if: ${{ success() && ( inputs.action == 'test' || inputs.action == 'merge' ) && ! inputs.shard && inputs.upload-artifacts != 'false' }}
with:
name: performance-results
path: ${{ env.ABS_ACTION_PATH }}/env/artifacts/performance-results.json
Expand All @@ -293,7 +301,7 @@ runs:

- name: Upload blob report
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ success() && inputs.shard != '' }}
if: ${{ success() && inputs.shard != '' && inputs.upload-artifacts != 'false' }}
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ABS_ACTION_PATH }}/env/blob-report
Expand Down
4 changes: 2 additions & 2 deletions env/tests/performance/cli/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ if ( process.env.GITHUB_SHA ) {
}

if ( beforeFile ) {
summaryMarkdown += `Note: the numbers in parentheses show the difference to the previous (baseline) test run.\n\n`;
summaryMarkdown += `Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.\n\n`;
}

console.log( 'Performance Test Results\n' );

if ( beforeFile ) {
console.log(
'Note: the numbers in parentheses show the difference to the previous (baseline) test run.\n'
'Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.\n'
);
}

Expand Down

0 comments on commit 8652c37

Please sign in to comment.