diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd8999a..2989eef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,13 @@ jobs: with: go-version-file: 'go.mod' + - name: Cache Go test cache + uses: actions/cache@v4 + with: + path: /home/runner/.cache/go-test-cache + key: ${{ runner.os }}-go-testcache-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go-testcache- + - name: Download dependencies run: go mod download if: steps.install-go.outputs.cache-hit != 'true' @@ -39,6 +46,8 @@ jobs: - name: Run Tests run: gotestsum --junitfile tests.xml --format pkgname -- -cover -race ./... + env: + GOCACHE: /home/runner/.cache/go-test-cache - name: Test Summary uses: test-summary/action@v2