From 66ea3d66384021009ba399657e6b7350d4c64513 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 22 Jan 2024 20:12:24 +0530 Subject: [PATCH] better cache key --- .github/workflows/ci.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9db675ec9..d5182a5d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,7 +286,7 @@ jobs: uses: magnetikonline/action-golang-cache@v4 with: go-version-file: src/go.mod - cache-key-suffix: unit-test + cache-key-suffix: unit-test-${{ github.sha }} - run: mkdir -p /tmp/corso-testlog @@ -313,6 +313,25 @@ jobs: -timeout 20m \ ./... + # run the tests + - name: Unit Tests Again + env: + # Set these to a bad value so we don't accidentally fall back to + # something elsewhere. + CORSO_M365_TEST_USER_ID: 'foo' + CORSO_SECONDARY_M365_TEST_USER_ID: 'foo' + run: | + set -euo pipefail + export GODEBUG=gocachetest=1 + go test \ + -tags testing \ + -json \ + -v \ + -failfast \ + -p 1 \ + -timeout 20m \ + ./... + # Upload the original go test output as an artifact for later review. - name: Upload test log if: always()