Skip to content

Commit

Permalink
Switch to GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
sirbrillig committed Dec 2, 2024
1 parent 8ab8272 commit 04e7dbc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/csqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ jobs:
run: wget https://raw.githubusercontent.com/WordPress/WordPress/refs/heads/master/wp-includes/PHPMailer/PHPMailer.php

- name: Run performance report
run: _PHPCS_RUNTIME=$(./vendor/bin/phpcs --standard=VariableAnalysis --report=Performance ./PHPMailer.php | grep -Eo 'TOTAL RUN TIME[ ]+[0-9.]+'|awk '{ print $4 }')
id: performance_report
run: echo "PHPCS_PERF_SECS=$(./vendor/bin/phpcs --standard=VariableAnalysis --report=Performance ./PHPMailer.php | grep -Eo 'TOTAL RUN TIME[ ]+[0-9.]+'|awk '{ print $4 }')" >> $GITHUB_OUTPUT

- name: Compare performance to baseline
run: if awk "BEGIN {exit !($_PHPCS_RUNTIME > 0.6)}"; then exit 1; fi
if: ${{ fromJSON( steps.phpunit_version.outputs.PHPCS_PERF_SECS ) > 0.6 }}
run: exit 1

0 comments on commit 04e7dbc

Please sign in to comment.