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: fix coverage report publishing #1597

Merged
merged 5 commits into from
Sep 22, 2023
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
5 changes: 3 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ name: Integration tests

on:
workflow_dispatch: # Runs on manual calls
schedule:
schedule:
- cron: "0 0 * * *" # Runs automatically every day
pull_request:
# paths makes the action run only when the given paths are changed
paths: ["**.go", "**.proto", "go.mod", "go.sum"]

# Allow concurrent runs on main/release branches but isolates other branches
# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}

jobs:
integration-tests:
# Job that runs all tests and publishes code coverage reports.
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand Down
13 changes: 7 additions & 6 deletions contrib/make/test.mk
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
###############################################################################
### Tests ###
###############################################################################
#########################################################################
# Tests
#########################################################################

PACKAGES_NOSIMULATION = ${shell go list ./... | grep -v simapp}

# Used for CI by Codecov
.PHONY: test-coverage
test-coverage:
go test ./... -v $(PACKAGES_NOSIMULATION) -short \
go test ./... $(PACKAGES_NOSIMULATION) -short \
-coverprofile=coverage.txt \
-covermode=atomic \
-race | grep -v "no test" | grep -v "no statement"

# NOTE: Using the verbose flag breaks the coverage reporting in CI.
# Used for CI by Codecov
.PHONY: test-coverage-integration
test-coverage-integration:
go test ./... -v $(PACKAGES_NOSIMULATION) \
go test ./... \
-coverprofile=coverage.txt \
-covermode=atomic \
-race | grep -v "no test" | grep -v "no statement"
Expand Down
1 change: 0 additions & 1 deletion x/perp/v2/keeper/clearing_house.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@
// update user volume
dnrEpoch, err := k.DnREpoch.Get(ctx)
if err != nil {
return err
}

Check warning on line 561 in x/perp/v2/keeper/clearing_house.go

View check run for this annotation

Codecov / codecov/patch

x/perp/v2/keeper/clearing_house.go#L560-L561

Added lines #L560 - L561 were not covered by tests
k.IncreaseTraderVolume(ctx, dnrEpoch, traderAddr, positionResp.ExchangedNotionalValue.Abs().TruncateInt())

transferredFee, err := k.transferFee(ctx, market.Pair, traderAddr, positionResp.ExchangedNotionalValue,
Expand Down Expand Up @@ -838,7 +838,6 @@
pair asset.Pair,
traderAddr sdk.AccAddress,
sizeAmt sdk.Dec, // unsigned

) (*types.PositionResp, error) {
market, err := k.GetMarket(ctx, pair)
if err != nil {
Expand Down
Loading