Skip to content

Commit

Permalink
Build/Test Tools: Fix Performance Test workflows on release branches.
Browse files Browse the repository at this point in the history
This fixes an issue after [59170] that was causing the Performance Test workflows to fail on older branches since the `CODEVITALS_PROJECT_TOKEN` input value was marked as required but was not being passed.

This is a follow-up to [59214] and [59215].

Fixes #62153.
Props desrosj, joemcgill, flixos90, swissspidy.


git-svn-id: https://develop.svn.wordpress.org/trunk@59217 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joemcgill committed Oct 11, 2024
1 parent dfe7c18 commit daa73d2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
secrets:
CODEVITALS_PROJECT_TOKEN:
description: 'The authorization token for https://www.codevitals.run/project/wordpress.'
required: true
required: false

env:
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
Expand Down Expand Up @@ -329,7 +329,12 @@ jobs:
COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
HOST_NAME: "www.codevitals.run"
run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
run: |
if [ -z "$CODEVITALS_PROJECT_TOKEN" ]; then
echo "Performance results could not be published. 'CODEVITALS_PROJECT_TOKEN' is not set" >> $GITHUB_OUTPUT
exit 1
fi
node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code

0 comments on commit daa73d2

Please sign in to comment.