From b1140299f4df7b9515f6e03dafdb87190ec8463a Mon Sep 17 00:00:00 2001 From: Julien Laffaye Date: Thu, 28 Oct 2021 23:27:51 -0400 Subject: [PATCH] Add cache to unit tests workflow --- .github/workflows/unit_tests.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index d767d56..48b2ade 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -10,6 +10,14 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.17 + - uses: actions/cache@v2 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Run tests run: go test -v -covermode=count -coverprofile=coverage.out - name: Convert coverage to lcov