From b6216b7fd38c41f9d32c64c67e6dd5aace58e97b Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 18 Jan 2024 17:19:18 +0000 Subject: [PATCH] CI: use a single cache for tests (#5266) * CI: use a single cache for tests Broadly the same set of files (mostly dependencies) will be compiled for every set of tests. * Removed '-0' in the cache key Signed-off-by: Marco Pracucci --------- Signed-off-by: Marco Pracucci Co-authored-by: Marco Pracucci --- .github/workflows/test-build-deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build-deploy.yml b/.github/workflows/test-build-deploy.yml index 1775a411a5f..7a1a1b028fa 100644 --- a/.github/workflows/test-build-deploy.yml +++ b/.github/workflows/test-build-deploy.yml @@ -221,7 +221,8 @@ jobs: - name: Cache Go build cache uses: actions/cache@v3 with: - key: test-${{ matrix.test_group_id }}-go-build-${{ runner.os }}-${{ hashFiles('go.mod', 'go.sum') }} + # Cache is shared between test groups. + key: test-go-build-${{ runner.os }}-${{ hashFiles('go.mod', 'go.sum') }} path: ${{ steps.gocache.outputs.path }} - name: Run Tests run: | @@ -319,7 +320,8 @@ jobs: - name: Cache Go build cache uses: actions/cache@v3 with: - key: integration-${{ matrix.test_group_id }}-go-build-${{ runner.os }}-${{ hashFiles('go.mod', 'go.sum') }} + # Cache is shared between test groups. + key: integration-go-build-${{ runner.os }}-${{ hashFiles('go.mod', 'go.sum') }} path: ${{ steps.gocache.outputs.path }} - name: Download Archive with Docker Images uses: actions/download-artifact@v4