From a16fb321f24ad12142a838db5f0aeaefd913b1fb Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:30:50 +0200 Subject: [PATCH] .github/workflows: manual caching of dependencies --- .github/workflows/go.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 41e9631f15..2ceb873aad 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,6 +16,21 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.21.4 + + - name: Cache Go modules + id: cache-go-mod + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install dependencies + run: go mod download + - name: Run tests run: go test -short ./... env: