-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: cargo test takes too long to test #90
Conversation
running 3 tests
test test_contract_build_fails_if_no_contract_exists ... ok
test test_contract_build_specify_path ... ok
test test_contract_build ... ok Why is |
The ignored one was not being run, there were 2 tests called My doubt is still what to run in the CI, once we have the up tests run everything |
So here's my suggestion. For product stability, i.e. sanity of generated template builds, it doesn't make sense to have them run whilst a PR is open for review or constantly being worked on. This slows us down. At bare minimum unit tests must be run on PRs. |
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.
I am not a fan of using ignore
. I would rather use a tiered approach.
cargo test
cargo test --features all_tests
cargo test --features all_unit_tests
cargo test --features all_contract_unit_tests
cargo test --features all_parachain_unit_tests
cargo test --features all_e2e_tests
cargo test --features all_e2e_contract_tests
cargo test --features all_e2e_parachain_tests
OR
cargo test
cargo test --features tier1_tests
cargo test --features tier2_tests
cargo test --features tier3_tests
where tier 1 would be least amount of tests and tier 3 would be full testing.
Done! No more ignored tests |
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.
Lgtm. Thanks @AlexD10S
Fixing Issue #88
Run only unit tests when
cargo test
unit tests that are a bit slower, build a contract move it into feature
unit_contract
. To runcargo test --features unit_contract
Run e2e tests using a feature flag
cargo test --features e2e_contract
for contracts andcargo test --features e2e_parachain
for parachainsMoved the test that builds a parachain to e2e test
In the CI run everything
cargo test --all-features -- --include-ignored