Performance Tests #11107
Workflow file for this run
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
name: Performance Tests | |
on: | |
deployment_status: | |
jobs: | |
test: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
if: github.event_name == 'deployment_status' && github.event.deployment.environment == 'production' && github.event.deployment_status.state == 'success' && startsWith(github.event.deployment_status.target_url, 'https://performance-studio') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-modules-${{ env.cache-name }}- | |
${{ runner.os }}-modules- | |
${{ runner.os }}- | |
- name: Install project dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
working-directory: ./perf | |
run: yarn install --frozen-lockfile | |
- name: Store Playwright's Version | |
run: | | |
PLAYWRIGHT_VERSION=$(npx playwright --version | sed 's/Version //') | |
echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: Cache Playwright Browsers for Playwright's Version | |
id: cache-playwright-browsers | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install Playwright Browsers | |
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
working-directory: ./perf | |
run: npx playwright install --with-deps | |
- name: Run Performance Tests | |
working-directory: ./perf | |
env: | |
BRANCH_DEPLOYMENT_URL: ${{ github.event.deployment_status.target_url }} | |
PERF_TEST_BRANCH: 'next' | |
PERF_TEST_SANITY_TOKEN: ${{ secrets.PERF_TEST_SANITY_TOKEN }} | |
PERF_TEST_METRICS_TOKEN: ${{ secrets.PERF_TEST_METRICS_TOKEN }} | |
run: yarn perf:test:ci |