-
Notifications
You must be signed in to change notification settings - Fork 65
71 lines (70 loc) · 2.36 KB
/
bench-graphql.yml
File metadata and controls
71 lines (70 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Rust Benchmarks
permissions:
# submit PR comment
pull-requests: write
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
on:
workflow_call:
jobs:
benchmark:
name: GraphQL Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- name: Install maturin
run: pip install maturin==1.8.3
- name: Build raphtory
run: make install-python
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: grafana/setup-k6-action@v1
with:
k6-version: '1.0.0'
- name: Run GraphQL benchmarks
run: cd graphql-bench && make bench-local
- name: Restore metadata file
run: git restore graphql-bench/data/apache/master/.raph # otherwise github-action-benchmark fails to create the commit
- name: Print bench results
run: cat graphql-bench/output.json
- name: Store benchmark results from master branch
if: github.ref == 'refs/heads/master'
uses: benchmark-action/github-action-benchmark@v1
with:
name: GraphQL Benchmark
tool: 'customBiggerIsBetter'
output-file-path: graphql-bench/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: '200%'
comment-on-alert: true
summary-always: true
fail-on-alert: false
auto-push: true
benchmark-data-dir-path: dev/bench-graphql
- name: Compare benchmark results to master
if: github.ref != 'refs/heads/master'
uses: benchmark-action/github-action-benchmark@v1
with:
name: GraphQL Benchmark
tool: 'customBiggerIsBetter'
output-file-path: graphql-bench/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: '200%'
comment-on-alert: true
summary-always: true
fail-on-alert: false
save-data-file: false
benchmark-data-dir-path: dev/bench-graphql