ci: split tests into offline and live#1677
Draft
pcriadoperez wants to merge 1 commit intosammchardy:masterfrom
Draft
ci: split tests into offline and live#1677pcriadoperez wants to merge 1 commit intosammchardy:masterfrom
pcriadoperez wants to merge 1 commit intosammchardy:masterfrom
Conversation
Separate mocked/offline tests from live/testnet tests using a `@pytest.mark.live` marker so offline tests run strict (no reruns) and live tests tolerate flakiness (--reruns 3). - Register `live` marker in conftest.py and pyproject.toml - Add `pytest.mark.live` to 23 live test files - Handle mixed file (test_client_gift_card.py) with per-function markers - Refactor module-level API call in test_threaded_socket_manager.py into fixture - Add tox environments: `offline` and `live` - Split GitHub Actions into parallel test-offline and test-live jobs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@pytest.mark.livemarker to separate mocked/offline tests from live/testnet testspytest -m "not live") run strict with no reruns — if a new test forgets the marker and needs network, it fails immediately (safe default)pytest -m "live") run with--reruns 3to tolerate testnet flakinesstest-offline(10min timeout, no credentials) andtest-live(40min timeout, with credentials) jobstox -e offlineandtox -e liveenvironmentstest_threaded_socket_manager.pyinto a fixture so it doesn't run during offline test collectionTest plan
pytest -m "not live" --strict-markerscollects 104 offline tests, all pass without networkpytest -m "live"collects 995 live tests🤖 Generated with Claude Code