File tree Expand file tree Collapse file tree 3 files changed +51
-3
lines changed Expand file tree Collapse file tree 3 files changed +51
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Benchmark
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ pull_request :
7
+ branches :
8
+ - main
9
+
10
+ permissions :
11
+ contents : write
12
+ deployments : write
13
+ pull-requests : write
14
+
15
+ jobs :
16
+ benchmark :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+ - uses : actions/setup-go@v4
21
+ with :
22
+ go-version : stable
23
+
24
+ - name : Run benchmark
25
+ run : go test ./... -benchmem -bench ^Benchmark -benchtime=300000x | tee bench.log
26
+
27
+ - name : Check benchmark result
28
+ uses : benchmark-action/github-action-benchmark@v1
29
+ with :
30
+ name : Go Benchmark
31
+ tool : go
32
+ github-token : ${{ secrets.GITHUB_TOKEN }}
33
+ output-file-path : bench.log
34
+ alert-threshold : ' 200%'
35
+ comment-on-alert : true
36
+ fail-on-alert : true
37
+ summary-always : true
38
+ alert-comment-cc-users : ' @pulsejet'
39
+
40
+ - name : Store benchmark result
41
+ uses : benchmark-action/github-action-benchmark@v1
42
+ if : github.event_name != 'pull_request'
43
+ with :
44
+ name : Go Benchmark
45
+ tool : go
46
+ output-file-path : bench.log
47
+ github-token : ${{ secrets.GITHUB_TOKEN }}
48
+ auto-push : true
49
+ fail-on-alert : true
Original file line number Diff line number Diff line change 12
12
runs-on : ${{ matrix.os }}
13
13
strategy :
14
14
matrix :
15
- os : [ubuntu-22.04, ubuntu-24.04,
16
- macos-13, macos-14,
17
- windows-2022]
15
+ os : [ubuntu-latest, macos-latest, windows-latest]
18
16
fail-fast : false
19
17
steps :
20
18
- name : Checkout repository
Original file line number Diff line number Diff line change 1
1
name : lint
2
2
on :
3
3
push :
4
+ branches : ["main"]
4
5
pull_request :
5
6
6
7
jobs :
You can’t perform that action at this time.
0 commit comments