|
|
|
@ -69,6 +69,34 @@ jobs:
|
|
|
|
|
- name: Build darwin binary
|
|
|
|
|
run: |
|
|
|
|
|
GOOS=darwin go build
|
|
|
|
|
check-codebase:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
env:
|
|
|
|
|
GOFLAGS: -mod=vendor
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
- name: Setup Go
|
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
|
with:
|
|
|
|
|
go-version: 1.18.x
|
|
|
|
|
- name: Cache build
|
|
|
|
|
uses: actions/cache@v1
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
~/.cache/go-build
|
|
|
|
|
~/go/pkg/mod
|
|
|
|
|
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build
|
|
|
|
|
restore-keys: |
|
|
|
|
|
${{runner.os}}-go-
|
|
|
|
|
- name: Check Cheatsheet
|
|
|
|
|
run: |
|
|
|
|
|
go run scripts/cheatsheet/main.go check
|
|
|
|
|
- name: Check Vendor Directory
|
|
|
|
|
# ensure our vendor directory matches up with our go modules
|
|
|
|
|
run: |
|
|
|
|
|
go mod vendor && git diff --exit-code || (echo "Unexpected change to vendor directory. Run 'go mod vendor' locally and commit the changes" && exit 1)
|
|
|
|
|
lint:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
env:
|
|
|
|
|