-
-
Notifications
You must be signed in to change notification settings - Fork 145
74 lines (59 loc) · 1.67 KB
/
ci.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
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
65
66
67
68
69
70
71
72
73
74
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: build
strategy:
matrix:
go_version:
- 1.19.2
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
- name: Setup buf action
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Check out code
uses: actions/checkout@v3
- name: Get tools dependencies
run: make tools
- name: Lint
run: make lint
- name: Lint proto files
uses: bufbuild/buf-lint-action@v1
- name: Build
run: make build
- name: Stack
run: docker-compose -f build/docker/docker-compose.yml up --build -d
- name: Test
run: go test -tags integration -race -coverprofile=coverage.txt -covermode=atomic -v ./...
- name: Bench
run: make bench
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
name: Go Benchmark
tool: 'go'
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: false
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-always: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt