From 5323cd68e7dc52fc26520b7a7664e3a48d4afbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Salavisa?= Date: Fri, 14 Aug 2026 17:04:56 +0100 Subject: [PATCH] ci(e2e): cache Go modules and build cache in the E2E build job (#2657) Co-authored-by: Kandev Agent Co-authored-by: Claude Opus 5 (1M context) --- .github/workflows/e2e-tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index d1487d054c..121dd34e30 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -78,6 +78,21 @@ jobs: key: pnpm-${{ runner.os }}-${{ hashFiles('apps/pnpm-lock.yaml') }} restore-keys: pnpm-${{ runner.os }}- + # Same reasoning as the pnpm store above: the image sets GOPATH=/root/go + # and leaves GOCACHE at its default, and $HOME is /root, so these are the + # same two paths backend-tests.yml caches. Without this the backend build + # below starts from a cold module *and* build cache on every run. + - name: Cache Go modules + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: go-e2e-build-${{ runner.os }}-${{ hashFiles('apps/backend/go.mod', 'apps/backend/go.sum') }} + restore-keys: | + go-e2e-build-${{ runner.os }}- + go-${{ runner.os }}- + - name: Install dependencies working-directory: apps run: pnpm install --frozen-lockfile