Skip to content

Commit 2e618d9

Browse files
committed
feat: install codspeed
1 parent d9cc24f commit 2e618d9

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CodSpeed
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 2.*
8+
pull_request:
9+
branches:
10+
- master
11+
- 2.*
12+
13+
env:
14+
GOFLAGS: '-tags=nobadger,nomysql,nopgx'
15+
# https://github.com/actions/setup-go/issues/491
16+
GOTOOLCHAIN: local
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
benchmarks:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
pull-requests: read
27+
steps:
28+
- name: Harden the runner (Audit all outbound calls)
29+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
30+
with:
31+
egress-policy: audit
32+
33+
- name: Checkout code
34+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
35+
36+
- name: Install Go
37+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
38+
with:
39+
go-version: "~1.25.0"
40+
check-latest: true
41+
42+
- name: Get dependencies
43+
run: |
44+
go get -v -t -d ./...
45+
46+
- name: Run benchmarks
47+
uses: CodSpeedHQ/action@v3
48+
with:
49+
run: go test -bench=. ./...

0 commit comments

Comments
 (0)