Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ci): coverpkg=gno.land/... for txtar tests #3088

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
required: false
type: string
secrets:
codecov-token:
required: true
Expand All @@ -23,7 +26,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version: ${{ inputs.go-version }}
- name: Go test
working-directory: ${{ inputs.modulepath }}
env:
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
Loading