update go.sum #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push,pull_request] | |
jobs: | |
check_fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
id: go | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Intsall Golangci-lint | |
run: | | |
# add executables installed with go get to PATH | |
# TODO: this will hopefully be fixed by | |
# https://github.com/actions/setup-go/issues/14 | |
export PATH=${PATH}:`go env GOPATH`/bin | |
go get -u golang.org/x/tools/cmd/goimports | |
go get github.com/golangci/golangci-lint/cmd/[email protected] | |
go get -u mvdan.cc/sh/cmd/shfmt | |
go get -u mvdan.cc/sh/cmd/gosh | |
go mod tidy | |
- name: Lint | |
run: | | |
bash findlargefile.sh | |
make checkgofmt && make fmt_go | |
make linter | |
unit-test: | |
name: unit-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
id: go | |
- name: set go env | |
run: export PATH=${PATH}:`go env GOPATH`/bin | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: unit-test | |
run: | | |
sudo sysctl -w net.core.rmem_max=2500000 | |
make test | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
id: go | |
- name: set go env | |
run: export PATH=${PATH}:`go env GOPATH`/bin | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: ut coverage | |
run: | | |
sudo sysctl -w net.core.rmem_max=2500000 | |
make coverage | |
- name: cover report | |
if: success() | |
run: bash <(curl -s https://codecov.io/bash) | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
id: go | |
- name: set go env | |
run: export PATH=${PATH}:`go env GOPATH`/bin | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: deploy | |
run: | | |
make build_ci | |
make autotest dapp=all | |
make docker-compose && make docker-compose-down | |
test-goarch-386: | |
name: Run test cases with GOARCH=386 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
- name: Build | |
run: make build | |
env: | |
GOARCH: 386 | |
- name: Run test in 386 | |
run: go test ./... -covermode=atomic | |
env: | |
GOARCH: 386 | |