From 8652c376109423783084dfca9d4ea09ea0937f0a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 25 Sep 2024 18:16:33 +0200 Subject: [PATCH] Try again --- .github/workflows/test-comparison.yml | 2 ++ action.yml | 14 +++++++++++--- env/tests/performance/cli/results.js | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-comparison.yml b/.github/workflows/test-comparison.yml index d034401..1675149 100644 --- a/.github/workflows/test-comparison.yml +++ b/.github/workflows/test-comparison.yml @@ -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 diff --git a/action.yml b/action.yml index 6c8f503..41cd99f 100644 --- a/action.yml +++ b/action.yml @@ -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' }} @@ -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' @@ -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 @@ -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 diff --git a/env/tests/performance/cli/results.js b/env/tests/performance/cli/results.js index bcd6a28..d781b2c 100644 --- a/env/tests/performance/cli/results.js +++ b/env/tests/performance/cli/results.js @@ -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' ); }