Skip to content

Commit de7d926

Browse files
committed
feat: benchmarks
1 parent a70ee95 commit de7d926

File tree

1 file changed

+14
-30
lines changed

1 file changed

+14
-30
lines changed

.github/workflows/benchmarks.yml

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Benchmark
1+
name: Benchmarks
22

33
on:
44
push:
@@ -7,35 +7,24 @@ on:
77
types: [opened, synchronize]
88

99
permissions:
10-
pull-requests: write
10+
issues: write
1111

1212
jobs:
1313
benchmarks:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
19-
- name: Setup pnpm
20-
uses: pnpm/action-setup@v2
16+
- uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
2118
with:
22-
version: 8
23-
24-
- name: Setup Node
25-
uses: actions/setup-node@v4
19+
version: 8.2.0
20+
- uses: actions/setup-node@v3
2621
with:
27-
node-version: '18'
28-
cache: pnpm
29-
30-
- name: Install dependencies
31-
run: pnpm install --frozen-lockfile --prefer-offline
32-
33-
- name: Run benchmarks
34-
run: pnpm run benchmarks
35-
36-
- name: Generate Markdown Table
37-
id: generate_table
38-
run: |
22+
node-version: 18
23+
cache: 'pnpm'
24+
cache-dependency-path: '**/pnpm-lock.yaml'
25+
- run: pnpm install --frozen-lockfile
26+
- run: pnpm run benchmarks
27+
- run: |
3928
FILES=("benchmarks/simple-read.json" "benchmarks/simple-write.json" "benchmarks/subscribe-write.json")
4029
echo "## Benchmark Results" > table.md
4130
for file in "${FILES[@]}"; do
@@ -49,17 +38,12 @@ jobs:
4938
fi
5039
done
5140
cat table.md
52-
53-
- name: Read table.md
54-
id: read_table
55-
run: |
41+
- run: |
5642
table_content=$(cat table.md)
5743
echo "table_content<<EOF" >> $GITHUB_ENV
5844
echo "$table_content" >> $GITHUB_ENV
5945
echo "EOF" >> $GITHUB_ENV
60-
61-
- name: Create Comment
62-
uses: peter-evans/create-or-update-comment@v2
46+
- uses: peter-evans/create-or-update-comment@v2
6347
with:
6448
issue-number: ${{ github.event.pull_request.number }}
6549
body: ${{ env.table_content }}

0 commit comments

Comments
 (0)