diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 603463cc..db5cf48a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,15 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: Unit Tests run: make unit-test @@ -52,6 +61,16 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: Build Linux Binaries run: make build-binaries @@ -65,6 +84,15 @@ jobs: with: go-version: ${{ env.DEFAULT_GO_VERSION }} + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: Check out code into the Go module directory uses: actions/checkout@v2 @@ -84,6 +112,15 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: Build Windows Binaries run: choco install make && choco install zip && RefreshEnv.cmd && make build-binaries-windows @@ -100,6 +137,15 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: Build Windows Docker Images run: choco install make && RefreshEnv.cmd && make build-docker-images-windows @@ -119,6 +165,15 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Restore go mod cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin/ + key: gocache + - name: E2E Tests run: test/k8s-local-cluster-test/run-test -v ${{ matrix.k8sVersion }}