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

ci: use coverpkg for accurate reporting of pkg/gnolang #1220

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ jobs:
export LOG_DIR="${{ runner.temp }}/logs/test-${{ matrix.goversion }}-gnoland"
make ${{ matrix.args }}
- name: Upload Test Log
if: always()
if: always()
uses: actions/upload-artifact@v3
with:
name: logs-test-gnoland-go${{ matrix.goversion }}
path: ${{ runner.temp }}/logs/**/*.log
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
with:
name: ${{runner.os}}-coverage-gnoland-${{ matrix.args}}-${{matrix.goversion}}
name: ${{ runner.os }}-coverage-gnoland-${{ matrix.args }}-${{ matrix.goversion }}
path: ./gno.land/coverage.out

upload-coverage:
Expand All @@ -99,7 +99,7 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: ${{ runner.temp }}/coverage
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}

docker-integration:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,15 @@ jobs:
run: |
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
# prefix check
case "${{ matrix.args }}" in _test.gnolang*)
GOTEST_FLAGS="$GOTEST_FLAGS -coverpkg github.com/gnolang/gno/gnovm/tests,github.com/gnolang/gno/gnovm/pkg/gnolang"
esac
make ${{ matrix.args }}
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
with:
name: ${{runner.os}}-coverage-gnovm-${{ matrix.args}}-${{matrix.goversion}}
name: ${{ runner.os }}-coverage-gnovm-${{ matrix.args }}-${{ matrix.goversion }}
path: ./gnovm/coverage.out

upload-coverage:
Expand All @@ -96,6 +100,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: ${{ runner.temp }}/coverage
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}

4 changes: 2 additions & 2 deletions .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
with:
name: ${{runner.os}}-coverage-tm2-${{ matrix.args}}-${{matrix.goversion}}
name: ${{runner.os }}-coverage-tm2-${{ matrix.args }}-${{matrix.goversion }}
path: ./tm2/coverage.out

upload-coverage:
Expand All @@ -86,6 +86,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: ${{ runner.temp }}/coverage
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}