Skip to content

Commit

Permalink
chore: coverpkg=gno.land/... for gno.land txtars
Browse files Browse the repository at this point in the history
Signed-off-by: moul <94029+moul@users.noreply.github.com>
  • Loading branch information
moul committed Nov 7, 2024
1 parent 9129e4e commit f0b76f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ jobs:
uses: ./.github/workflows/main_template.yml
with:
modulepath: "gno.land"
tests-extra-args: "-coverpkg=github.com/gnolang/gno/gno.land/..."
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/main_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
modulepath:
required: true
type: string
tests-extra-args:
required: false
type: string
secrets:
codecov-token:
required: true
Expand Down Expand Up @@ -32,6 +35,7 @@ jobs:
modulepath: ${{ inputs.modulepath }}
tests-timeout: "30m"
go-version: "1.22.x"
tests-extra-args: ${{ inputs.tests-extra-args }}
secrets:
codecov-token: ${{ secrets.codecov-token }}


17 changes: 10 additions & 7 deletions .github/workflows/test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
required: true
type: string
tests-timeout:
required: true
type: string
required: true
type: string
go-version:
required: true
type: string
required: true
type: string
tests-extra-args:
require: false
type: string
secrets:
codecov-token:
required: true
Expand All @@ -21,7 +24,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version: ${{ inputs.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Go test
Expand All @@ -42,7 +45,7 @@ jobs:
# 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 -covermode=atomic -timeout ${{ inputs.tests-timeout }} ${{ inputs.tests-extra-args }} ./... -test.gocoverdir=$GOCOVERDIR
# Print results
(set +x; echo 'go coverage results:')
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version: ${{ inputs.go-version }}
# go-version: ${{ inputs.go-version }}
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Go race test
Expand Down

0 comments on commit f0b76f7

Please sign in to comment.