-
Notifications
You must be signed in to change notification settings - Fork 88
39 lines (36 loc) · 1.16 KB
/
benchmark.yml
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
name: Benchmark
on:
pull_request:
types: [ opened, reopened, synchronize, labeled ]
env:
MIX_ENV: test
jobs:
benchmark:
if: contains(github.event.pull_request.labels.*.name, 'benchmark')
runs-on: ubuntu-latest
steps:
- name: Install nghttp2
run: sudo apt-get install nghttp2
- name: Checkout code
uses: actions/checkout@v4
with:
repository: mtrudel/benchmark
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.14.x
otp-version: 25.1
- name: Install mix dependencies
run: mix deps.get
- name: Compile code
run: mix compile
- name: Run benchmark against base branch
run: mix benchmark bandit@${{ github.event.pull_request.base.repo.clone_url }}@${{ github.event.pull_request.base.ref }} bandit@${{ github.event.pull_request.head.repo.clone_url }}@${{ github.event.pull_request.head.sha }}
- name: Upload results file
uses: actions/upload-artifact@v4
with:
name: http-benchmark.csv
path: http-benchmark.csv
- name: Record summary output
id: summary
run: cat http-summary.md >> $GITHUB_STEP_SUMMARY