From f8530da1b39035540bfe63338f103bb8ae4f2862 Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:24:31 +0100 Subject: [PATCH 1/2] fix: expand coverage Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- .github/workflows/test_template.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml index 38fa10e096b..bb94b17da76 100644 --- a/.github/workflows/test_template.yml +++ b/.github/workflows/test_template.yml @@ -36,13 +36,17 @@ jobs: mkdir -p "$GOCOVERDIR" "$TXTARCOVERDIR" "$COVERDIR" # Craft a filter flag based on the module path to avoid expanding coverage on unrelated tags. - export filter="-pkg=github.com/gnolang/gno/${{ inputs.modulepath }}/..." + export coverpkg="github.com/gnolang/gno/${{ inputs.modulepath }}/..." + export filter="-pkg=$coverpkg" # XXX: Simplify coverage of txtar - the current setup is a bit # confusing and meticulous. There will be some improvements in Go # 1.23 regarding coverage, so we can use this as a workaround until # then. - go test -covermode=atomic -timeout ${{ inputs.tests-timeout }} ./... -test.gocoverdir=$GOCOVERDIR + go test ./... -coverpkg=$coverpkg \ + -covermode=atomic \ + -timeout ${{ inputs.tests-timeout }} \ + -test.gocoverdir=$GOCOVERDIR # Print results (set +x; echo 'go coverage results:') From d5470fa11377add503ea7f6104fdb46b4f69ab89 Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:06:53 +0100 Subject: [PATCH 2/2] fix: increase timeout to 40m Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- .github/workflows/main_template.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main_template.yml b/.github/workflows/main_template.yml index 8efb0277816..e681c91e6d7 100644 --- a/.github/workflows/main_template.yml +++ b/.github/workflows/main_template.yml @@ -30,8 +30,7 @@ jobs: uses: ./.github/workflows/test_template.yml with: modulepath: ${{ inputs.modulepath }} - tests-timeout: "30m" + tests-timeout: "40m" go-version: "1.22.x" secrets: codecov-token: ${{ secrets.codecov-token }} - \ No newline at end of file