chore: Update engines (#2624) #290
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: Perf Test V2 | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'packages/replicache/**' | |
- 'packages/replicache-perf/**' | |
jobs: | |
benchmark: | |
name: Performance regression check | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
# Clear out potential user data dirs left over from previous failures. | |
- run: rm -rf /tmp/replicache-playwright-* | |
- run: npm ci | |
- run: npx playwright install --with-deps | |
- run: npm run build | |
working-directory: packages/replicache-perf | |
# Run benchmark and stores the output to a file | |
- name: Run benchmark | |
working-directory: packages/replicache-perf | |
run: | | |
npm run build | |
npx tsx src/runner.ts --format=json | tee perf-temp-output.json | |
node tool/split-perf.js perf-temp-output.json perf-v2-output.json perf-v2-p95-output.json | |
shell: bash | |
# Run `github-action-benchmark` action | |
- name: Store benchmark result | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
# What benchmark tool the output.json came from | |
tool: 'customSmallerIsBetter' | |
# Where the output from the benchmark tool is stored | |
output-file-path: packages/replicache-perf/perf-v2-output.json | |
# Workflow will fail when an alert happens | |
fail-on-alert: true | |
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
benchmark-data-dir-path: perf-v2 | |
auto-push: true | |
alert-threshold: '130%' | |
comment-on-alert: true | |
- name: Store benchmark result p95 | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
# What benchmark tool the output.json came from | |
tool: 'customSmallerIsBetter' | |
# Where the output from the benchmark tool is stored | |
output-file-path: packages/replicache-perf/perf-v2-p95-output.json | |
# Workflow will NOT fail when an alert happens | |
fail-on-alert: false | |
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
benchmark-data-dir-path: perf-v2/p95 | |
auto-push: true | |
alert-threshold: '1000%' | |
comment-on-alert: false |