diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9202242..df1c0a8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,24 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Setup Cache for Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install Tools + run: | + pushd "$(mktemp -d)" + go get github.com/gordonklaus/ineffassign + go get golang.org/x/lint/golint + go get github.com/client9/misspell/cmd/misspell + go get honnef.co/go/tools/cmd/staticcheck + go get github.com/onsi/ginkgo/ginkgo github.com/onsi/gomega/... + popd + - name: Verify Go Modules Setup run: | go mod verify @@ -38,27 +56,22 @@ jobs: - name: Sanity Check (ineffassign) run: | - go get github.com/gordonklaus/ineffassign ineffassign ./... - name: Sanity Check (golint) run: | - go get golang.org/x/lint/golint golint ./... - name: Sanity Check (misspell) run: | - go get github.com/client9/misspell/cmd/misspell find . -type f | xargs misspell -source=text -error - name: Sanity Check (staticcheck) run: | - go get honnef.co/go/tools/cmd/staticcheck staticcheck ./... - name: Run Go Unit Tests run: | - go get github.com/onsi/ginkgo/ginkgo github.com/onsi/gomega/... ginkgo -r -randomizeAllSpecs -randomizeSuites -failOnPending -nodes=4 -compilers=2 -race -trace -cover - name: Upload Code Coverage Profile