From 40d9df92ad0bfeaac6ceb4f9b906c2347f5caa90 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Wed, 4 Dec 2024 10:07:36 -0500 Subject: [PATCH 01/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index e46ab67..3293918 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,7 +35,8 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log + echo "aaron tye" + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options ./... > ~/run.log From 26c26d139eac4e5bb79bfd0571d9b673dfd7cd1b Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Wed, 4 Dec 2024 10:24:54 -0500 Subject: [PATCH 02/39] Update go-common.yml --- .github/workflows/go-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-common.yml b/.github/workflows/go-common.yml index 258c33c..c7dcf3c 100644 --- a/.github/workflows/go-common.yml +++ b/.github/workflows/go-common.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Run unit tests and check package coverage - uses: dell/common-github-actions/go-code-tester@main + uses: dell/common-github-actions/go-code-tester@usr/atye/unit-test-exclude-dirs with: threshold: ${{ env.CODE_COVERAGE_TARGET }} test-folder: ${{ env.CODE_COVERAGE_DIR }} From 0664941c670554ce0a255cce0218def5ac9f5b90 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Wed, 4 Dec 2024 10:39:37 -0500 Subject: [PATCH 03/39] remove ./... --- go-code-tester/entrypoint.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 3293918..452db79 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,14 +35,13 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - echo "aaron tye" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options ./... > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log fi else - GOEXPERIMENT=nocoverageredesign go test $skip_options -v -short -count=1 -cover $run_options ./... > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v -short -count=1 -cover $run_options > ~/run.log fi TEST_RETURN_CODE=$? From 9068bd335f9f4467dd84761e5e10846e4a9f9b8c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 10:18:24 -0500 Subject: [PATCH 04/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 452db79..de39045 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,7 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log From 023bc281c41653803b96345dd474bfc9b19e086b Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 10:22:29 -0500 Subject: [PATCH 05/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index de39045..fe900dc 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,6 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then + echo "aaron tye" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From c8558e02c444e666935861d8b4856bbc9c48f686 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 10:25:36 -0500 Subject: [PATCH 06/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index fe900dc..f7f8785 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,7 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - echo "aaron tye" + echo $EXCLUDE_DIRECTORIES GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From a8dc8d54a3fef3ab4a83ac86fc61d2188feeb55c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 11:51:25 -0500 Subject: [PATCH 07/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index f7f8785..77ee718 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,7 +36,9 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then echo $EXCLUDE_DIRECTORIES - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log + ex=$(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) + echo $ex + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log From 5ef8f1da6f7aa0c01f00d466f2c0bcc29deb9a9e Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 11:54:30 -0500 Subject: [PATCH 08/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 77ee718..6c8f214 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,9 +35,10 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then + echo ${TEST_FOLDER} echo $EXCLUDE_DIRECTORIES - ex=$(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) - echo $ex + ex=$(go list ./... | grep -vE ${EXCLUDE_DIRECTORIES}) + echo ${ex} GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From bba684596a9a9f0298a7785265db26e51e37e8dd Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 11:56:42 -0500 Subject: [PATCH 09/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 6c8f214..00129dc 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -37,8 +37,8 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then echo ${TEST_FOLDER} echo $EXCLUDE_DIRECTORIES - ex=$(go list ./... | grep -vE ${EXCLUDE_DIRECTORIES}) - echo ${ex} + ex=$(go list ./... | grep -vE "${EXCLUDE_DIRECTORIES}") + echo "${ex}" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From 62bbbe69209559265607152280abbb961ee571a9 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 11:59:09 -0500 Subject: [PATCH 10/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 00129dc..4ef69ba 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -37,9 +37,9 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then echo ${TEST_FOLDER} echo $EXCLUDE_DIRECTORIES - ex=$(go list ./... | grep -vE "${EXCLUDE_DIRECTORIES}") - echo "${ex}" - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log + ex=$(echo $EXCLUDE_DIRECTORIES && go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") + echo "$ex" + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log From 4658b504ea770e5e82c72d9266c5cd875a2c1542 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:07:34 -0500 Subject: [PATCH 11/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 4ef69ba..f4740a8 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -39,6 +39,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo $EXCLUDE_DIRECTORIES ex=$(echo $EXCLUDE_DIRECTORIES && go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") echo "$ex" + go list ./... | grep -vE $EXCLUDE_DIRECTORIES GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From a025e2d1617ada5638c8b2696292e50e048f3060 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:10:17 -0500 Subject: [PATCH 12/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index f4740a8..0879448 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -39,7 +39,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo $EXCLUDE_DIRECTORIES ex=$(echo $EXCLUDE_DIRECTORIES && go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") echo "$ex" - go list ./... | grep -vE $EXCLUDE_DIRECTORIES + go list ./... GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From a73c017a2eacb911c3f6e7af70d1664067a00a88 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:12:09 -0500 Subject: [PATCH 13/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 0879448..b8ebbe9 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -x # Copyright (c) 2020-2024 Dell Inc., or its subsidiaries. All Rights Reserved. # From 7eb54b0540143c2fdbfa49e717a4905bbe09e70d Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:20:23 -0500 Subject: [PATCH 14/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index b8ebbe9..c8dcc5b 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,12 +36,8 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - echo ${TEST_FOLDER} - echo $EXCLUDE_DIRECTORIES - ex=$(echo $EXCLUDE_DIRECTORIES && go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") - echo "$ex" - go list ./... - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE "$EXCLUDE_DIRECTORIES") -short -race -count=1 -cover $run_options > ~/run.log + echo $PWD + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log From dbeddfbe2b2991ad199baf6379fc951bd17b74e5 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:21:52 -0500 Subject: [PATCH 15/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index c8dcc5b..933d785 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -37,6 +37,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then echo $PWD + ls GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From c6e1e466ea695220b47fb9c702971d156e215282 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:26:33 -0500 Subject: [PATCH 16/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 933d785..4041d4d 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,8 +36,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - echo $PWD - ls + go env GOPATH GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From d1646b64ac80a590fc17840a493ac9e846eecf28 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:29:08 -0500 Subject: [PATCH 17/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 4041d4d..88cc5f9 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,7 +36,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - go env GOPATH + echo $GOPATH GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log else # Run without the race flag From 95c6c60f7e5844127574f1c0eff6166087456321 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:30:16 -0500 Subject: [PATCH 18/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 88cc5f9..c383f89 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -31,13 +31,13 @@ if [[ -n $RUN_TEST ]]; then fi go clean -testcache +go mod tidy cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - echo $GOPATH - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log From 2cdcb27d19190cf884052814f37e8109908b75b3 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:31:52 -0500 Subject: [PATCH 19/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index c383f89..a5d6212 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -37,6 +37,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then + go list ./... GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From 6442147b6009257f1dc50ae9307edaab761c03eb Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 12:33:05 -0500 Subject: [PATCH 20/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index a5d6212..ac15674 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -37,7 +37,8 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - go list ./... + output=$(go list ./...) + echo "go list output: $output" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From 0edd94be891dfe02b0f6de6017f04a185087cd6c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 13:14:12 -0500 Subject: [PATCH 21/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index ac15674..a1ebc0d 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -31,7 +31,8 @@ if [[ -n $RUN_TEST ]]; then fi go clean -testcache -go mod tidy +export GO111MODULE=on +export GOPATH=$(go env GOPATH) cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then From da2edbb3e2c106d81c07d63431c89b5192102102 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 13:21:51 -0500 Subject: [PATCH 22/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index a1ebc0d..87db7d2 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -31,8 +31,6 @@ if [[ -n $RUN_TEST ]]; then fi go clean -testcache -export GO111MODULE=on -export GOPATH=$(go env GOPATH) cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then From fc79c084f090d40d889b24e824107c3bf378e44e Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 13:29:59 -0500 Subject: [PATCH 23/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 87db7d2..b4b4b6f 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -x # Copyright (c) 2020-2024 Dell Inc., or its subsidiaries. All Rights Reserved. # @@ -36,6 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then + ls -al output=$(go list ./...) echo "go list output: $output" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log From 2570815a4c4ddca1c3338bff9148233392566c1d Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 13:39:45 -0500 Subject: [PATCH 24/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index b4b4b6f..9c84ad6 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,7 +36,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then ls -al - output=$(go list ./...) + output=$(go list ./... 2>&1) echo "go list output: $output" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else From 4c4c432408ca60f7e97ecec8434425ef82bcb351 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 13:52:06 -0500 Subject: [PATCH 25/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 9c84ad6..db749a5 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,6 +36,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then ls -al + go list ./... || echo "go list command failed with exit status $?" output=$(go list ./... 2>&1) echo "go list output: $output" GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log From c79f24bf1b60cc303635062d39b8e1e37d717a4c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:03:28 -0500 Subject: [PATCH 26/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index db749a5..2d77756 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,10 +35,8 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - ls -al - go list ./... || echo "go list command failed with exit status $?" - output=$(go list ./... 2>&1) - echo "go list output: $output" + go list ./... 2>&1 | tee go_list_output.txt + cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From 74534527ecfe1a4aaff3f9843bea915c484d6c6c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:07:06 -0500 Subject: [PATCH 27/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 2d77756..2f35c75 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,6 +36,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then go list ./... 2>&1 | tee go_list_output.txt + echo "AARON" cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else From c3c42eb4fc72f9aac04c088a63877e4c7f1fb33c Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:10:21 -0500 Subject: [PATCH 28/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 2f35c75..e37b03d 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -36,8 +36,7 @@ if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then go list ./... 2>&1 | tee go_list_output.txt - echo "AARON" - cat go_list_output.txt + echo "AARON" && cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag From 366c283947f05230af0685f1c5b75f3ac357dd14 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:13:36 -0500 Subject: [PATCH 29/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index e37b03d..dacf4fb 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,7 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - go list ./... 2>&1 | tee go_list_output.txt + go list ./... > go_list_output.txt 2>&1 echo "AARON" && cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else From beb67df3065fc210b4183a8c56b0f363037801bc Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:17:09 -0500 Subject: [PATCH 30/39] Update Dockerfile --- go-code-tester/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/Dockerfile b/go-code-tester/Dockerfile index 47df33a..f305970 100644 --- a/go-code-tester/Dockerfile +++ b/go-code-tester/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23 +FROM golang:1.23.2 LABEL "com.github.actions.name"="go-code-tester" LABEL "com.github.actions.description"="Runs unit tests and verifies code coverage per package" From 6b69d0dd1ec005812f873b42f2ab49ee5c404c5d Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:29:53 -0500 Subject: [PATCH 31/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index dacf4fb..763060a 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -35,7 +35,7 @@ cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - go list ./... > go_list_output.txt 2>&1 + go list -x ./... > go_list_output.txt 2>&1 echo "AARON" && cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else From 110c72e5b3eb8e7a1ac8f1417c5a833754242a9e Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:37:41 -0500 Subject: [PATCH 32/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 763060a..e6ddebd 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -30,6 +30,7 @@ if [[ -n $RUN_TEST ]]; then fi go clean -testcache +go mod tidy cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then From d5ad32168d42b32b6edc077d6b8cc2e514a9c0ea Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:41:17 -0500 Subject: [PATCH 33/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index e6ddebd..e2bbed4 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -29,6 +29,7 @@ if [[ -n $RUN_TEST ]]; then run_options="-run $RUN_TEST" fi +go env -w GOFLAGS=-buildvcs=false go clean -testcache go mod tidy From a305d06184980e4e45732e0494cde377216a86b4 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:44:19 -0500 Subject: [PATCH 34/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index e2bbed4..7acbf51 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -31,21 +31,18 @@ fi go env -w GOFLAGS=-buildvcs=false go clean -testcache -go mod tidy cd ${TEST_FOLDER} if [[ -n $EXCLUDE_DIRECTORIES ]]; then echo "excluding the following directories: $EXCLUDE_DIRECTORIES" if [[ -z $RACE_DETECTOR ]] || [[ $RACE_DETECTOR == "true" ]]; then - go list -x ./... > go_list_output.txt 2>&1 - echo "AARON" && cat go_list_output.txt GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -race -count=1 -cover $run_options ./... > ~/run.log else # Run without the race flag - GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v $(go list ./... | grep -vE $EXCLUDE_DIRECTORIES) -short -count=1 -cover $run_options ./... > ~/run.log fi else - GOEXPERIMENT=nocoverageredesign go test $skip_options -v -short -count=1 -cover $run_options > ~/run.log + GOEXPERIMENT=nocoverageredesign go test $skip_options -v -short -count=1 -cover $run_options ./... > ~/run.log fi TEST_RETURN_CODE=$? From 9e71f6f1572ef610406af8d62cfbb727ca1e004f Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:45:42 -0500 Subject: [PATCH 35/39] Update Dockerfile --- go-code-tester/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/Dockerfile b/go-code-tester/Dockerfile index f305970..47df33a 100644 --- a/go-code-tester/Dockerfile +++ b/go-code-tester/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.2 +FROM golang:1.23 LABEL "com.github.actions.name"="go-code-tester" LABEL "com.github.actions.description"="Runs unit tests and verifies code coverage per package" From 75f41557c2e83704f78d6f8e3cc93af445d6ba67 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:51:03 -0500 Subject: [PATCH 36/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index 7acbf51..ec28a19 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -29,7 +29,7 @@ if [[ -n $RUN_TEST ]]; then run_options="-run $RUN_TEST" fi -go env -w GOFLAGS=-buildvcs=false +#go env -w GOFLAGS=-buildvcs=false go clean -testcache cd ${TEST_FOLDER} From 4bd1bd2bf0b9c80a97496e127a5a44e4fa297cb5 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 14:53:03 -0500 Subject: [PATCH 37/39] Update entrypoint.sh --- go-code-tester/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-code-tester/entrypoint.sh b/go-code-tester/entrypoint.sh index ec28a19..7acbf51 100755 --- a/go-code-tester/entrypoint.sh +++ b/go-code-tester/entrypoint.sh @@ -29,7 +29,7 @@ if [[ -n $RUN_TEST ]]; then run_options="-run $RUN_TEST" fi -#go env -w GOFLAGS=-buildvcs=false +go env -w GOFLAGS=-buildvcs=false go clean -testcache cd ${TEST_FOLDER} From 64149adca9a1d746a9868167795b99f906edf9d0 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 15:17:05 -0500 Subject: [PATCH 38/39] Update entrypoint.sh From 316c35f3c56602bb9f35a59bc316a8ad2eaeee7b Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Thu, 5 Dec 2024 15:22:13 -0500 Subject: [PATCH 39/39] Update go-common.yml --- .github/workflows/go-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-common.yml b/.github/workflows/go-common.yml index c7dcf3c..258c33c 100644 --- a/.github/workflows/go-common.yml +++ b/.github/workflows/go-common.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Run unit tests and check package coverage - uses: dell/common-github-actions/go-code-tester@usr/atye/unit-test-exclude-dirs + uses: dell/common-github-actions/go-code-tester@main with: threshold: ${{ env.CODE_COVERAGE_TARGET }} test-folder: ${{ env.CODE_COVERAGE_DIR }}