-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance analysis workflow (#10625)
* Performance analsysis workflow * add `replayio install` step * use proper preview deployment for pull_request runs * enable metadata params * parseInt pullRequest
- Loading branch information
Showing
17 changed files
with
881 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Performance analysis | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */2 * * *" # every 2 hours | ||
|
||
jobs: | ||
perf-analysis: | ||
name: Performance analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Get the yarn cache path. | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "{dir}={$(yarn config get cacheFolder)}" >> $GITHUB_OUTPUT | ||
- name: Restore yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: | | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
**/node_modules | ||
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: "yarn-cache-folder-" | ||
# Actually install packages with Yarn | ||
- name: Install packages | ||
run: yarn install | ||
env: | ||
YARN_CHECKSUM_BEHAVIOR: "update" | ||
- name: Install Replay Chromium | ||
run: npx replayio@latest install | ||
- name: Wait for Vercel preview deployment to be ready | ||
uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 | ||
if: github.event_name == 'pull_request' | ||
id: wait-for-vercel-preview | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
max_timeout: 240 | ||
- name: Run performance analysis | ||
run: yarn run perf-analysis | ||
env: | ||
REPLAY_API_KEY: ${{ secrets.PERFORMANCE_ANALYSIS_REPLAY_API_KEY }} | ||
DEVTOOLS_URL: ${{ steps.wait-for-vercel-preview.outputs.url }} | ||
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }} | ||
GITHUB_REF_NAME: ${{ env.GITHUB_REF_NAME }} | ||
GITHUB_PR: ${{ github.event.pull_request && github.event.pull_request.number }} | ||
GITHUB_SHA: ${{ env.GITHUB_SHA }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.