diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 68fe30f8a8..5ea87d60a9 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -151,7 +151,7 @@ jobs: - name: Upload test cache uses: actions/upload-artifact@v4 with: - name: gotestcache + name: gotestcache-$RUNNER_OS path: ${{ github.workspace }}/cache.out - name: Check how much space is left after unit test diff --git a/Makefile b/Makefile index ead6038710..9c621e2e87 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ tests-verbose: TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PACKAGE=./... bash ./scripts/tests.sh tests-unit: - TEST_PACKAGE=./internal/pkg/... bash ./scripts/tests.sh + TEST_PACKAGE=./internal/pkg/diff/... bash ./scripts/tests.sh tests-unit-verbose: TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./internal/pkg... bash ./scripts/tests.sh diff --git a/scripts/tests.sh b/scripts/tests.sh index 888e4aa7dd..0d362bd09f 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -36,7 +36,7 @@ fi # Run tests, sequentially because the API is shared resource echo "Running tests ..." export KBC_VERSION_CHECK=false # do not check the latest version in the tests -cmd="gotestsum --no-color=false --format \"$TEST_LOG_FORMAT\" -- -timeout 1800s -p $TEST_PARALLELISM_PKG -parallel $TEST_PARALLELISM $TEST_ARGS "$TEST_PACKAGE" $@ 2> cache.out" +cmd="GODEBUG=gocachehash=1 gotestsum --no-color=false --format \"$TEST_LOG_FORMAT\" -- -timeout 1800s -p $TEST_PARALLELISM_PKG -parallel $TEST_PARALLELISM $TEST_ARGS "$TEST_PACKAGE" $@ 2> cache.out" echo $cmd eval $cmd echo "Ok. All tests passed."