2020-05-31 06:44:34 +00:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ '*' ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2020-06-04 16:16:45 +00:00
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
2020-06-15 16:15:54 +00:00
|
|
|
- name: Go mod tidy checker
|
|
|
|
id: gomodtidy
|
|
|
|
uses: ./.github/actions/gomodtidy
|
|
|
|
|
2020-06-04 16:16:45 +00:00
|
|
|
- name: Gofmt checker
|
|
|
|
id: gofmt
|
|
|
|
uses: ./.github/actions/gofmt
|
|
|
|
with:
|
|
|
|
path: ./
|
2021-10-04 11:06:21 +00:00
|
|
|
|
2021-06-22 19:57:26 +00:00
|
|
|
- name: GoImports checker
|
|
|
|
id: goimports
|
|
|
|
uses: Jerome1337/goimports-action@v1.0.2
|
|
|
|
with:
|
|
|
|
goimports-path: ./
|
2020-06-04 16:16:45 +00:00
|
|
|
|
2021-08-15 15:24:13 +00:00
|
|
|
- name: Gosec security scanner
|
|
|
|
uses: securego/gosec@master
|
|
|
|
with:
|
2021-10-18 12:04:01 +00:00
|
|
|
args: '-exclude=G307 -exclude-dir=crypto/bls/herumi ./...'
|
2021-10-04 11:06:21 +00:00
|
|
|
|
|
|
|
- name: Golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-10-22 22:40:03 +00:00
|
|
|
args: --print-issued-lines --sort-results --no-config --timeout=10m --disable-all -E deadcode -E errcheck -E gosimple --skip-files=validator/web/site_data.go
|
2021-10-04 11:06:21 +00:00
|
|
|
|
2020-05-31 06:44:34 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.x
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ^1.14
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
|
|
|
|
- name: Build
|
2020-09-16 13:28:28 +00:00
|
|
|
# Use blst tag to allow go and bazel builds for blst.
|
2021-04-11 11:11:15 +00:00
|
|
|
run: go build -v ./...
|
2020-05-31 06:44:34 +00:00
|
|
|
|
|
|
|
# Tests run via Bazel for now...
|
|
|
|
# - name: Test
|
|
|
|
# run: go test -v ./...
|