File tree Expand file tree Collapse file tree
.github/actions/prepare-go Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7979 key : go-${{ runner.os }}${{ runner.arch }}-${{ steps.setup-go.outputs.go-version }}-build-${{ env.COMMIT }}
8080 restore-keys : |
8181 go-${{ runner.os }}${{ runner.arch }}-${{ steps.setup-go.outputs.go-version }}-build-
82+
83+ - name : Print cache status
84+ shell : bash
85+ env :
86+ BUILD_CACHE_HIT : ${{ steps.restore-build.outputs.cache-hit }}
87+ BUILD_CACHE_MATCHED_KEY : ${{ steps.restore-build.outputs.cache-matched-key }}
88+ BUILD_CACHE_PRIMARY_KEY : ${{ steps.restore-build.outputs.cache-primary-key }}
89+ DEPENDENCY_CACHE_HIT : ${{ steps.restore-deps.outputs.cache-hit }}
90+ DEPENDENCY_CACHE_MATCHED_KEY : ${{ steps.restore-deps.outputs.cache-matched-key }}
91+ DEPENDENCY_CACHE_PRIMARY_KEY : ${{ steps.restore-deps.outputs.cache-primary-key }}
92+ TOOLS_CACHE_HIT : ${{ steps.restore-tools.outputs.cache-hit }}
93+ TOOLS_CACHE_MATCHED_KEY : ${{ steps.restore-tools.outputs.cache-matched-key }}
94+ TOOLS_CACHE_PRIMARY_KEY : ${{ steps.restore-tools.outputs.cache-primary-key }}
95+ run : |
96+ cache_status() {
97+ local hit="$1"
98+ local matched_key="$2"
99+ if [[ "$hit" == "true" ]]; then
100+ printf "exact"
101+ elif [[ -n "$matched_key" ]]; then
102+ printf "partial"
103+ else
104+ printf "miss"
105+ fi
106+ }
107+
108+ echo "::notice::Go dependency cache $(cache_status "$DEPENDENCY_CACHE_HIT" "$DEPENDENCY_CACHE_MATCHED_KEY") (key: $DEPENDENCY_CACHE_PRIMARY_KEY, matched: ${DEPENDENCY_CACHE_MATCHED_KEY:-none})"
109+ echo "::notice::Go tools cache $(cache_status "$TOOLS_CACHE_HIT" "$TOOLS_CACHE_MATCHED_KEY") (key: $TOOLS_CACHE_PRIMARY_KEY, matched: ${TOOLS_CACHE_MATCHED_KEY:-none})"
110+ echo "::notice::Go build cache $(cache_status "$BUILD_CACHE_HIT" "$BUILD_CACHE_MATCHED_KEY") (key: $BUILD_CACHE_PRIMARY_KEY, matched: ${BUILD_CACHE_MATCHED_KEY:-none})"
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ integration-test-coverage: prepare-coverage-test
533533
534534# This should use the same build flags as functional-test-coverage and functional-test-{xdc,ndc}-coverage for best build caching.
535535pre-build-functional-test-coverage : prepare-coverage-test
536- go test -c -cover -o /dev/null $(FUNCTIONAL_TEST_ROOT ) $(TEST_ARGS ) $(TEST_TAG_FLAG ) $( COVERPKG_FLAG )
536+ go test -c -cover -o /dev/null $(COMPILED_TEST_ARGS ) $(COVERPKG_FLAG ) $(FUNCTIONAL_TEST_ROOT )
537537
538538functional-test-coverage : prepare-coverage-test
539539 @printf $(COLOR ) " Run functional tests with coverage with $( PERSISTENCE_DRIVER) driver..."
You can’t perform that action at this time.
0 commit comments