diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d9db9e1ad..7eaaca8d1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,8 +13,16 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + + - name: Cache go module + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - - name: Get dependencies + - name: Get dependencies and run test run: | go test ./...