-
Notifications
You must be signed in to change notification settings - Fork 100
64 lines (56 loc) · 1.97 KB
/
Copy pathbenchmark.yml
File metadata and controls
64 lines (56 loc) · 1.97 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
name: Benchmark
on:
push:
branches:
- master
permissions:
contents: write # auto-push to the gh-pages branch
# The second store step skips fetching gh-pages, so it cannot recover
# from a push rejected by a concurrent run.
concurrency: benchmark
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: ruby/setup-ruby@v1
id: ruby
with:
ruby-version: '4.0'
bundler-cache: true
# Keyed by the scripts, which pin the gem versions and the collection revision.
- uses: actions/cache@v6
with:
path: |
tmp/benchmark/bundle
~/.cache/rbs
key: benchmark-${{ steps.ruby.outputs.ruby-prefix }}-${{ hashFiles('tool/benchmark.rb', 'tool/benchmark/project.rb') }}
- name: Run benchmark
run: bundle exec ruby tool/benchmark.rb
- name: Store analysis time
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'Analysis time'
tool: 'customSmallerIsBetter'
output-file-path: tmp/benchmark/analysis_time.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# Pushed by the next step so that GitHub Pages deploys once per run.
auto-push: false
summary-always: true
# Shared runners vary by 10-20%; only flag clear regressions.
alert-threshold: '150%'
comment-on-alert: true
- name: Store type coverage
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'Type coverage'
tool: 'customBiggerIsBetter'
output-file-path: tmp/benchmark/type_coverage.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# Fetching would fail because the local gh-pages is ahead of the remote.
skip-fetch-gh-pages: true
auto-push: true
summary-always: true
alert-threshold: '100%'
comment-on-alert: true