-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (35 loc) · 1.17 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
name: Go package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.18' ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install cob
run: curl -sfL https://raw.githubusercontent.com/knqyf263/cob/master/install.sh | sudo sh -s -- -b /usr/local/bin
- name: Run test and build
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go get -u github.com/shuLhan/go-bindata/...
go install github.com/shuLhan/go-bindata/v4/cmd/go-bindata@master
go-bindata -pkg bindata -o bindata/bindata.go etc/*
go get ./...
go build -ldflags "-X main.version=$(git describe --tags)" -o dbanon main.go
go test -coverprofile=coverage.out -covermode=atomic -race -v ./...
- name: Run Git Status
run: git status
- name: Run Benchmark
run: cob
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3