File tree Expand file tree Collapse file tree 3 files changed +14
-76
lines changed Expand file tree Collapse file tree 3 files changed +14
-76
lines changed Original file line number Diff line number Diff line change @@ -8,37 +8,11 @@ permissions:
8
8
contents : write
9
9
deployments : write
10
10
11
+ env :
12
+ GH_ACCESS_TOKEN : ${{ secrets.GH_PAT }}
13
+
11
14
jobs :
12
15
benchmark :
13
16
name : Execute Benchmarks
14
- strategy :
15
- matrix :
16
- go-version : [1.19.x]
17
- runs-on : ubuntu-latest
18
- steps :
19
- - uses : actions/setup-go@v4
20
- with :
21
- go-version : ${{ matrix.go-version }}
22
- stable : false
23
- - name : Checkout code
24
- uses : actions/checkout@v3
25
- - name : Run benchmark
26
- run : go test -bench=. ./... | tee output.txt
27
- - name : Download previous benchmark data
28
- uses : actions/cache@v3
29
- with :
30
- path : ./cache
31
- key : ${{ runner.os }}-benchmark
32
- - name : Store benchmark result
33
- uses : benchmark-action/github-action-benchmark@v1
34
- with :
35
- name : Benchmark Results
36
- tool : ' go'
37
- output-file-path : output.txt
38
- benchmark-data-dir-path : dev/bench
39
- github-token : ${{ secrets.GITHUB_TOKEN }}
40
- auto-push : true
41
- alert-threshold : ' 200%'
42
- comment-on-alert : true
43
- fail-on-alert : true
44
- alert-comment-cc-users : ' @benjivesterby'
17
+ uses : devnw/workflows/.github/workflows/make-bench.yml@main
18
+ secrets : inherit # pragma: allowlist secret
Original file line number Diff line number Diff line change 4
4
push :
5
5
tags :
6
6
- " v*"
7
+ env :
8
+ GH_ACCESS_TOKEN : ${{ secrets.GH_PAT }}
7
9
8
10
jobs :
9
- build :
10
- name : Make Build
11
- strategy :
12
- matrix :
13
- platform : [ubuntu-latest, macos-latest, windows-latest]
14
- fail-fast : true
15
- steps :
16
- - name : Checkout code
17
- uses : actions/checkout@v4
18
-
19
- - name : Install Go
20
- uses : actions/setup-go@v4
21
- with :
22
- go-version : ${{ vars.GO_VERSION }}
23
- stable : false
24
-
25
- - name : Build
26
- run : make build-ci
27
-
28
- - name : Upload Test Coverage
29
- uses : actions/upload-artifact@v3
30
- with :
31
- name : coverage
32
- path : coverage.txt
33
-
34
- - name : Upload Fuzz Results
35
- uses : actions/upload-artifact@v3
36
- with :
37
- name : fuzz-results
38
- path : testdata/fuzz
39
-
40
11
release :
41
- needs : [build]
42
- name : " Tagged Release"
43
- runs-on : " ubuntu-latest"
44
- steps :
45
- - name : Checkout code
46
- uses : actions/checkout@v4
47
- - name : Create Github Release from Tag
48
- uses : " marvinpinto/action-automatic-releases@latest"
49
- with :
50
- repo_token : " ${{ secrets.GITHUB_TOKEN }}"
51
- prerelease : false
52
- files : |
53
- LICENSE
12
+ name : Tagged Release
13
+ uses : devnw/workflows/.github/workflows/make-release.yml@main
14
+ secrets : inherit # pragma: allowlist secret
Original file line number Diff line number Diff line change 36
36
done ; \
37
37
done
38
38
39
-
39
+ bench :
40
+ go test -bench=. -benchmem ./...
40
41
41
42
lint : tidy
42
43
golangci-lint run
@@ -80,6 +81,8 @@ test-ci: deps tidy lint
80
81
build-ci : test-ci
81
82
$(env ) go build ./...
82
83
84
+ bench-ci : test-ci
85
+ go test -bench=. ./... | tee output.txt
83
86
84
87
release-ci : build-ci
85
88
goreleaser release --rm-dist
You can’t perform that action at this time.
0 commit comments