From e23c58b32d091beda12fc269016cd7b1e69b8a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Va=C5=A1ko?= Date: Thu, 12 Dec 2024 16:30:52 +0100 Subject: [PATCH] feat: Add step for exporting testcache entries add it as artefact --- .github/workflows/test-unit.yml | 6 ++++++ scripts/tests.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 6a58b010fb..68fe30f8a8 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -148,6 +148,12 @@ jobs: TEST_KBC_PROJECTS_FILE: '${{ github.workspace }}/${{ vars.TEST_KBC_PROJECTS_FILE }}' UNIT_ETCD_ENABLED: ${{ matrix.name == 'linux' && 'true' || 'false' }} + - name: Upload test cache + uses: actions/upload-artifact@v4 + with: + name: gotestcache + path: ${{ github.workspace }}/cache.out + - name: Check how much space is left after unit test if: matrix.name == 'linux' shell: bash diff --git a/scripts/tests.sh b/scripts/tests.sh index b91f71fd79..888e4aa7dd 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" $@" +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" echo $cmd eval $cmd echo "Ok. All tests passed."