chore: add historical performance benchmarking (#1432)

This commit is contained in:
Andrew Tatomyr
2024-02-16 12:03:34 +02:00
committed by GitHub
parent c51fbc78b1
commit d01b16fc81
7 changed files with 89 additions and 9 deletions

View File

@@ -6,13 +6,13 @@ on:
- main
jobs:
hyperfine:
latest-vs-next:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
@@ -38,4 +38,41 @@ jobs:
uses: thollander/actions-comment-pull-request@v2
with:
filePath: benchmark_check.md
comment_tag: hyperfine-comparison
comment_tag: latest-vs-next-comparison
historical-versions:
# Run only on release branch (changeset-release/main):
if: github.head_ref == 'changeset-release/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Install External
run: npm i -g hyperfine
- name: Prepare
run: |
npm run compile
npm run pack:prepare
cd benchmark/
npm i
npm run make-test
- name: Run Benchmark
run: |
cd benchmark/
npm test
cat benchmark_check.md
env:
CI: true
REDOCLY_TELEMETRY: off
- name: Comment PR
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: thollander/actions-comment-pull-request@v2
with:
filePath: benchmark/benchmark_check.md
comment_tag: historical-versions-comparison

View File

@@ -199,7 +199,7 @@ jobs:
- name: Send to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: C019K52TC0L #releases
payload-file-path: './output/release-message.json'

View File

@@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
@@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
@@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Coverage Report
uses: artiomtr/jest-coverage-report-action@v2.0.8
@@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
@@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci