Add minimal CI pipeline#11
Merged
Merged
Conversation
Replace `alephim/p2p-service:latest` with `alephim/p2p-service:0.1.5` in both service definitions so CI runs against a known-good, immutable image rather than a floating tag that can change between runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The p2p-service returns HTTP 404 for self-dial (the same status it uses for any unreachable peer), with no discriminating information in the response. The client therefore raises DialFailedException, not DialWrongPeerException. Align the test with the service's actual contract.
- Replace `from defaults import *` with explicit imports in client.py and tests/utils.py to satisfy F403/F405. - Drop `f` prefix on f-strings without placeholders (F541). - Break long lines to keep max_line_length = 88 (E501). - Add missing blank lines before class definitions (E302). - Ignore F401 in __init__.py since the unused imports there are intentional public-API re-exports.
Runs flake8, then pytest against rabbitmq + two alephim/p2p-service:0.1.5 containers spun up via tests/docker-compose.yml, then builds the package and uploads the dist/ artifact. Triggers on push to main and on every PR.
- Make cancel-in-progress conditional on branch so back-to-back pushes to main don't cancel each other's runs (PR branches still cancel). - Move flake8 and build into the testing extras so local devs running pip install -e '.[testing]' get the same tooling CI uses.
Add inline comments explaining (a) why F401 is suppressed for __init__.py — flake8 cannot see public-API re-exports used by external callers — and (b) why cancel-in-progress is conditional on the branch — stale PR runs should be cancelled; pushes to main should not.
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
.github/workflows/ci.ymlrunning on push tomainand on every PR. Lints with flake8, runs pytest against RabbitMQ + twoalephim/p2p-service:0.1.5containers (viatests/docker-compose.yml), and builds the wheel/sdist.tests/docker-compose.ymlfrom:latestto:0.1.5so local and CI runs use the same binary.test_dial_selfto expectDialFailedException, matching the service's actual contract (self-dial returns HTTP 404, indistinguishable from any other unreachable peer).src/andtests/so the new lint gate is green on first run.flake8andbuildinto thetestingextras so local dev and CI use the same tooling declaration.Test plan
🤖 Generated with Claude Code