diff --git a/.github/workflows/pd-tests.yaml b/.github/workflows/pd-tests.yaml index 3674e41cf8a..1508c1a1457 100644 --- a/.github/workflows/pd-tests.yaml +++ b/.github/workflows/pd-tests.yaml @@ -72,7 +72,7 @@ jobs: TOTAL_JOBS: ${{needs.chunks.outputs.job-total}} run: for i in $(seq 1 $TOTAL_JOBS); do cat covprofile_$i >> covprofile; done - name: Send coverage - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4.2.0 with: token: ${{ secrets.CODECOV }} file: ./covprofile diff --git a/client/Makefile b/client/Makefile index 89c4936d179..3328bfe8d11 100644 --- a/client/Makefile +++ b/client/Makefile @@ -13,18 +13,18 @@ # limitations under the License. ROOT_PATH := $(shell pwd)/.. -GO_TOOLS_BIN_PATH := $(shell pwd)/../.tools/bin +GO_TOOLS_BIN_PATH := $(ROOT_PATH)/.tools/bin PATH := $(GO_TOOLS_BIN_PATH):$(PATH) SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash) default: static tidy test test: failpoint-enable - CGO_ENABLE=1 go test ./... -v -tags deadlock -race -cover || { $(MAKE) failpoint-disable && exit 1; } + CGO_ENABLED=1 go test ./... -v -tags deadlock -race -cover || { $(MAKE) failpoint-disable && exit 1; } $(MAKE) failpoint-disable basic-test: failpoint-enable - CGO_ENABLE=1 go test ./... || { $(MAKE) failpoint-disable && exit 1; } + CGO_ENABLED=1 go test ./... || { $(MAKE) failpoint-disable && exit 1; } $(MAKE) failpoint-disable ci-test-job: diff --git a/scripts/ci-subtask.sh b/scripts/ci-subtask.sh index effd250965f..c00cba9c0a4 100755 --- a/scripts/ci-subtask.sh +++ b/scripts/ci-subtask.sh @@ -12,11 +12,11 @@ if [[ $2 -gt 9 ]]; then fi # Currently, we only have 3 integration tests, so we can hardcode the task index. - integrations_dir=./tests/integrations + integrations_dir=$(pwd)/tests/integrations integrations_tasks=($(find "$integrations_dir" -mindepth 1 -maxdepth 1 -type d)) for t in "${integrations_tasks[@]}"; do if [[ "$t" = "$integrations_dir/client" && $2 -eq 11 ]]; then - cd ./client && make ci-test-job && cat covprofile >> $ROOT_PATH_COV && cd .. || exit 1 + cd ./client && make ci-test-job && cat covprofile >> $ROOT_PATH_COV || exit 1 cd $integrations_dir && make ci-test-job test_name=client && cat ./client/covprofile >> $ROOT_PATH_COV || exit 1 elif [[ "$t" = "$integrations_dir/tso" && $2 -eq 12 ]]; then cd $integrations_dir && make ci-test-job test_name=tso && cat ./tso/covprofile >> $ROOT_PATH_COV || exit 1 @@ -61,5 +61,5 @@ else [[ $(($min_i + 1)) -eq $2 ]] && res+=($t) done - CGO_ENABLED=1 go test -timeout=15m -tags deadlock -race -covermode=atomic -coverprofile=$ROOT_PATH_COV -coverpkg=./... ${res[@]} + CGO_ENABLED=1 go test -timeout=15m -tags deadlock -race -cover -covermode=atomic -coverprofile=$ROOT_PATH_COV -coverpkg=./... ${res[@]} fi diff --git a/tests/integrations/Makefile b/tests/integrations/Makefile index b43ecabce7e..73cf4da8ab9 100644 --- a/tests/integrations/Makefile +++ b/tests/integrations/Makefile @@ -35,8 +35,8 @@ test: failpoint-enable $(MAKE) failpoint-disable ci-test-job: - if [ -f covprofile ]; then rm ./$(value test_name)/covprofile; fi - CGO_ENABLED=1 go test ./$(value test_name)/... -v -tags deadlock -race -cover -covermode=atomic -coverprofile=./$(value test_name)/covprofile -coverpkg=$(ROOT_PATH)/... + if [ -f ./$(value test_name)/covprofile ]; then rm ./$(value test_name)/covprofile; fi + CGO_ENABLED=1 go test ./$(value test_name)/... -v -tags deadlock -race -cover -covermode=atomic -coverprofile=./$(value test_name)/covprofile -coverpkg=../../... install-tools: cd $(ROOT_PATH) && $(MAKE) install-tools