-
Notifications
You must be signed in to change notification settings - Fork 193
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: refactors cli.network suites with 'Integration' to use common function #1652
Conversation
…om/NibiruChain/nibiru into realu/consistent-integration-suite
Codecov Report
@@ Coverage Diff @@
## master #1652 +/- ##
==========================================
+ Coverage 74.25% 74.28% +0.02%
==========================================
Files 191 191
Lines 15099 15096 -3
==========================================
+ Hits 11212 11214 +2
+ Misses 3256 3251 -5
Partials 631 631
|
- name: Run all unit tests. | ||
run: make test-coverage | ||
run: make test-unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the unit-test.yml
GitHub action, there's no reason to save a coverage.txt since it's not published or visible. We're only using the reports from the integration-test.yml
action. We can use make test-unit
here to have the CI run faster.
.PHONY: test-coverage | ||
test-coverage: | ||
go test ./... $(PACKAGES_NOSIMULATION) -short \ | ||
.PHONY: test-coverage-unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using $PACKAGES_NOSIMULATION
is unnecessary since simulations require a specific flag and we're already using the -short
flag, which can filter out simulations
…om/NibiruChain/nibiru into realu/consistent-integration-suite
Summary
Makes our implementation of the convention for skipping network tests with
testing.short
and the-short
flag consistent across modules.Makes it so that simulations (
simapp
tests) are filtered out without us needing to usego list
. As can be seen incontrib/make/simulation.mk
, the simulation tests use an-Enabled=true
flag in setup and aren't considered unit tests (using the-short
flag). Their setup can follow the same convention as the integration tests by callingtestutil.BeforeIntegrationSuite
.ci: In the
unit-test.yml
GitHub action, there's no reason to save a coverage.txt since it's not published or visible from outside the workflow. We're only using the reports fromintegration-test.yml
, so it makes sense to usemake test-unit
here and have the action run faster.Purpose
This change makes the code less repetitive and easier to maintain by having the doc comment on a common function.
Unit tests run in 3-6 minutes now instead of 8+ min.
This will fix the false-alarm CI failures resulting from
cli.Network
tests running when they shouldn't be. For example, https://github.com/NibiruChain/nibiru/actions/runs/6566058545/job/17835937660?pr=1643:[Expand example block]