From a68c0680fe8dc1989b108c0f1e8ff03eb294a6d8 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Mon, 11 Sep 2023 16:34:36 -0400 Subject: [PATCH 1/6] longer timeout on windows UT --- .github/workflows/build-and-test.yml | 6 ++++++ scripts/build_test.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 811dcad05969..96215f4972e3 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -22,9 +22,15 @@ jobs: with: go-version: '~1.20.8' check-latest: true + - name: Set timeout on Windows # Windows UT run slower and need a longer timeout + if: matrix.os == 'windows-2022' + run: | + echo "TIMEOUT=180s" >> $GITHUB_ENV - name: build_test shell: bash run: .github/workflows/build_and_test.sh + env: + TIMEOUT: ${{ env.TIMEOUT }} - name: fuzz_test shell: bash if: matrix.os == 'ubuntu-22.04' # Only run on Ubuntu 22.04 diff --git a/scripts/build_test.sh b/scripts/build_test.sh index 9f80f1e132c1..6e7d1683635d 100755 --- a/scripts/build_test.sh +++ b/scripts/build_test.sh @@ -7,5 +7,6 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) # Load the constants source "$AVALANCHE_PATH"/scripts/constants.sh + # Ensure execution of fixture unit tests under tests/ but exclude ginkgo tests in tests/e2e and tests/upgrade -go test -shuffle=on -race -timeout="120s" -coverprofile="coverage.out" -covermode="atomic" $(go list ./... | grep -v /mocks | grep -v proto | grep -v tests/e2e | grep -v tests/upgrade) +go test -shuffle=on -race -timeout=${TIMEOUT:-"120s"} -coverprofile="coverage.out" -covermode="atomic" $(go list ./... | grep -v /mocks | grep -v proto | grep -v tests/e2e | grep -v tests/upgrade) From f4cc435cc1f14bbf7fa07193a04a49c053c509a0 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Tue, 12 Sep 2023 09:34:42 -0400 Subject: [PATCH 2/6] add debug step --- .github/workflows/build-and-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 96215f4972e3..061194fd174b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -25,7 +25,10 @@ jobs: - name: Set timeout on Windows # Windows UT run slower and need a longer timeout if: matrix.os == 'windows-2022' run: | - echo "TIMEOUT=180s" >> $GITHUB_ENV + echo "TIMEOUT=240s" >> $GITHUB_ENV + - name: TODO remove this debug step + run: | + echo "TIMEOUT=$TIMEOUT" - name: build_test shell: bash run: .github/workflows/build_and_test.sh From 739d68e78b6869047b6681be186779f06b58630a Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Tue, 12 Sep 2023 09:37:43 -0400 Subject: [PATCH 3/6] add debug step 2 --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 061194fd174b..a55ba0bdd100 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -28,7 +28,7 @@ jobs: echo "TIMEOUT=240s" >> $GITHUB_ENV - name: TODO remove this debug step run: | - echo "TIMEOUT=$TIMEOUT" + echo "TIMEOUT=${{ env.TIMEOUT }}" - name: build_test shell: bash run: .github/workflows/build_and_test.sh From e5e5a5d6fa80ac5505426d8575527c855be14923 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Tue, 12 Sep 2023 09:40:14 -0400 Subject: [PATCH 4/6] use shell flag in gh action --- .github/workflows/build-and-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a55ba0bdd100..bb538787e9f0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,10 +23,12 @@ jobs: go-version: '~1.20.8' check-latest: true - name: Set timeout on Windows # Windows UT run slower and need a longer timeout + shell: bash if: matrix.os == 'windows-2022' run: | echo "TIMEOUT=240s" >> $GITHUB_ENV - name: TODO remove this debug step + shell: bash run: | echo "TIMEOUT=${{ env.TIMEOUT }}" - name: build_test From ec98ea6173b7a743adaa22961f54e7410488a821 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Tue, 12 Sep 2023 09:53:56 -0400 Subject: [PATCH 5/6] remove debug step --- .github/workflows/build-and-test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index bb538787e9f0..fd40f37da61c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -27,10 +27,6 @@ jobs: if: matrix.os == 'windows-2022' run: | echo "TIMEOUT=240s" >> $GITHUB_ENV - - name: TODO remove this debug step - shell: bash - run: | - echo "TIMEOUT=${{ env.TIMEOUT }}" - name: build_test shell: bash run: .github/workflows/build_and_test.sh From bd9b25cb38d032dfcb6ab1186c779531bad1c69c Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Tue, 12 Sep 2023 10:18:24 -0400 Subject: [PATCH 6/6] remove newline --- scripts/build_test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build_test.sh b/scripts/build_test.sh index 6e7d1683635d..66ddd6b548e4 100755 --- a/scripts/build_test.sh +++ b/scripts/build_test.sh @@ -7,6 +7,5 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) # Load the constants source "$AVALANCHE_PATH"/scripts/constants.sh - # Ensure execution of fixture unit tests under tests/ but exclude ginkgo tests in tests/e2e and tests/upgrade go test -shuffle=on -race -timeout=${TIMEOUT:-"120s"} -coverprofile="coverage.out" -covermode="atomic" $(go list ./... | grep -v /mocks | grep -v proto | grep -v tests/e2e | grep -v tests/upgrade)