more cleanups #6202
Workflow file for this run
This file contains hidden or 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: Stress Tests | |
on: [push] | |
jobs: | |
stress-tests: | |
runs-on: ubuntu-latest-4-cores | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
- name: Set up Node.js | |
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build storybook | |
run: npx storybook build | |
working-directory: packages/react | |
- name: Run storybook | |
id: storybook | |
run: | | |
npx serve -l 6006 packages/react/storybook-static & | |
pid=$! | |
echo "pid=$pid" >> $GITHUB_OUTPUT | |
sleep 5 | |
- name: Run Stress Tests | |
uses: docker://mcr.microsoft.com/playwright:v1.55.0-jammy | |
env: | |
STORYBOOK_URL: 'http://172.17.0.1:6006' | |
with: | |
args: npx playwright test --grep @stress-test" | |
- name: Stop storybook | |
if: ${{ always() }} | |
run: kill ${{ steps.storybook.outputs.pid }} | |
- name: Download previous benchmark data (if any) | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: stress-tests-benchmark | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'customSmallerIsBetter' | |
output-file-path: results.json | |
# Where the previous data file is stored | |
external-data-json-path: ./cache/stress-tests-benchmark-data.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
alert-threshold: '200%' | |
# Workflow will not fail when an alert happens (fail-on-alert is set to false) | |
fail-on-alert: false | |
# Disable alert commit comment | |
comment-on-alert: false | |
# Mention @rhysd in the commit comment | |
alert-comment-cc-users: '@hectahertz' |