Skip to content

Merge pull request #37 from binance/rc-v0.7.0 #21

Merge pull request #37 from binance/rc-v0.7.0

Merge pull request #37 from binance/rc-v0.7.0 #21

Workflow file for this run

name: Run Tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
- rc-**
jobs:
Checks:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: './go.mod'
- name: Check Formatting
run: go fmt ./...
- name: Vet Project
run: go vet ./...
- name: Initialise StaticCheck
run: go get honnef.co/go/tools/cmd/staticcheck@latest && go install honnef.co/go/tools/cmd/staticcheck@latest
- name: StaticCheck - Check for unused functions, duplicate imports + more
run: staticcheck ./...
- name: Initialise DeadCode
run: go get github.com/remyoudompheng/go-misc/deadcode && go install github.com/remyoudompheng/go-misc/deadcode
- name: DeadCode - Check for unused variables
run: deadcode -test
- name: Initialise ErrCheck
run: go get github.com/kisielk/errcheck@latest && go install github.com/kisielk/errcheck@latest
- name: Install GoSec
run: go get github.com/securego/gosec/v2/cmd/gosec@latest && go install github.com/securego/gosec/v2/cmd/gosec@latest
- name: GoSec - Scan for potential security issues with gosec
run: gosec -tests -confidence high ./...
UnitTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: './go.mod'
- name: Run Unit Tests
run: go test -v -race -covermode=atomic .