1
- name : Benchmark
1
+ name : Benchmarks
2
2
3
3
on :
4
4
push :
7
7
types : [opened, synchronize]
8
8
9
9
permissions :
10
- pull-requests : write
10
+ issues : write
11
11
12
12
jobs :
13
13
benchmarks :
14
14
runs-on : ubuntu-latest
15
15
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
21
18
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
26
21
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 : |
39
28
FILES=("benchmarks/simple-read.json" "benchmarks/simple-write.json" "benchmarks/subscribe-write.json")
40
29
echo "## Benchmark Results" > table.md
41
30
for file in "${FILES[@]}"; do
@@ -49,17 +38,12 @@ jobs:
49
38
fi
50
39
done
51
40
cat table.md
52
-
53
- - name : Read table.md
54
- id : read_table
55
- run : |
41
+ - run : |
56
42
table_content=$(cat table.md)
57
43
echo "table_content<<EOF" >> $GITHUB_ENV
58
44
echo "$table_content" >> $GITHUB_ENV
59
45
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
63
47
with :
64
48
issue-number : ${{ github.event.pull_request.number }}
65
49
body : ${{ env.table_content }}
0 commit comments