better cache key

This commit is contained in:
Abin Simon 2024-01-22 20:12:24 +05:30
parent fbd3b79d96
commit 66ea3d6638

View File

@ -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()