Repository navigation
feat: Adding mock responses for remote API requests in CI - #51
Merged
Merged
Conversation
- Adding flake8 ignore for missing doc strings - Multi-testcases are refactored to use pytest-parameterization (easier to spot failing test cases) - Slow test cases are skip with pytest mark - DNS error handling for windows + macos - Temp. disabled test matrices
Member
|
I need an IP to look in some logs. Both of these failed because the "block_proxies" script hates this particular Github CI IP. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
==========================================
+ Coverage 95.66% 95.89% +0.22%
==========================================
Files 7 7
Lines 877 876 -1
==========================================
+ Hits 839 840 +1
+ Misses 38 36 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
malteos
marked this pull request as ready for review
September 15, 2025 22:27
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.
This PR introduces various changes to improve the CI pipeline. Most importantly, it introduces mock response so no remote server is called by the CI. The previous remote request made the CI unstable due to rate limits (runner IP being blocked by remote servers).
Overview of changes:
By default, all remote requests are mocked. To change this behaviour and actually call remote APIs (if you run this from a whitelisted IP address), the following environment variable can be set:
export DISABLE_MOCK_RESPONSES=1If the remote APIs change, new mock data can be semi-automatically collected by setting another environment variable, running corresponding unit tests, and overwriting existing mock data in
tests/data/mock_responses: