-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/add integration test for local run #48
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
Feature/add integration test for local run #48
Conversation
- Updated GitHub Actions workflow to ignore test files in Pylint analysis and added integration tests job. - Modified pytest command to exclude integration tests from coverage checks. - Added pytest markers for integration tests in pyproject.toml. - Removed unused conftest.py file and consolidated logging setup tests. - Created a dummy GitHub repository class for integration tests. - Added unit tests for version validation and action checks. - Cleaned up and organized test files into unit and integration directories. - Removed obsolete test files related to version validation and action checks.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR implements integration testing infrastructure by separating unit and integration tests in the CI workflow, introducing pytest configuration with integration markers, establishing test fixtures for subprocess execution with mocked GitHub interactions, and extracting error constants for improved code reusability. Changes
Sequence Diagram(s)sequenceDiagram
actor pytest as pytest Runner
participant main as main.py<br/>(subprocess)
participant sitecustomize as sitecustomize.py<br/>(patch module)
participant action as VersionTagCheckAction
participant dummy as DummyGitHubRepository
pytest->>pytest: Create tmp_path & sitecustomize<br/>with patch logic
pytest->>pytest: Set PYTHONPATH to include<br/>tmp_path & project_root
pytest->>main: subprocess.run(main.py)<br/>with env (PYTHONPATH, GH_TOKEN, etc.)
main->>sitecustomize: Auto-import sitecustomize.py<br/>at Python startup
sitecustomize->>sitecustomize: Patch GitHubRepository<br/>with DummyGitHubRepository
main->>action: Execute VersionTagCheckAction
action->>dummy: Instantiate mocked repo<br/>(owner, repo, token)
dummy->>dummy: get_all_tags()<br/>returns [v0.0.1, v0.0.2, v0.1.0]
action->>action: Validate tag against<br/>dummy repository
main->>pytest: Exit with code<br/>(0 for success, non-zero for error)
pytest->>pytest: Assert exit code &<br/>stdout/stderr content
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (5)version_tag_check/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
!(tests)/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
tests/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
version_tag_check/version_tag_check_action.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (10)📓 Common learnings📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
📚 Learning: 2025-12-15T11:23:24.034ZApplied to files:
🧬 Code graph analysis (1)version_tag_check/version_tag_check_action.py (1)
🪛 Ruff (0.14.11)tests/integration/test_local_run.py33-33: Possible hardcoded password assigned to: "INPUT_GITHUB_TOKEN" (S105) 41-41: (S603) 62-62: Possible hardcoded password assigned to: "INPUT_GITHUB_TOKEN" (S105) 67-67: (S603) 🔇 Additional comments (6)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Pull request overview
This pull request introduces integration tests that execute the action as a subprocess, reorganizes the test structure to separate unit and integration tests, and updates the CI workflow accordingly.
Changes:
- Added integration tests in
tests/integration/that runmain.pyas a subprocess with mocked repository behavior - Reorganized existing unit tests under
tests/unit/and registered a custom pytest marker for integration tests - Updated CI to run unit and integration tests separately, with Pylint now ignoring test files
Reviewed changes
Copilot reviewed 8 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/test_local_run.py | Implements integration tests that execute main.py via subprocess with environment-based inputs |
| tests/integration/dummy_github_repository.py | Provides a test double for GitHubRepository used in integration tests |
| tests/unit/test_version.py | Adds blank lines between test functions for formatting consistency |
| tests/unit/test_version_validator.py | Adds a blank line before decorator for formatting consistency |
| tests/unit/conftest.py | Adds blank lines between fixtures for formatting consistency |
| pyproject.toml | Registers the "integration" pytest marker to enable test categorization |
| DEVELOPER.md | Documents how to run unit and integration tests separately |
| .github/workflows/test.yml | Separates unit and integration test execution in CI, removes unused PYTHONPATH setup |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@miroslavpojer I've opened a new pull request, #49, to work on those changes. Once the pull request is ready, I'll request review from you. |
… fixture Co-authored-by: miroslavpojer <[email protected]>
Co-authored-by: miroslavpojer <[email protected]>
Refactor integration tests: extract error constants and shared fixture
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.
Pull request overview
Copilot reviewed 11 out of 16 changed files in this pull request and generated 2 comments.
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.
Pull request overview
Copilot reviewed 11 out of 16 changed files in this pull request and generated 1 comment.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@DEVELOPER.md`:
- Line 237: Update the pytest invocation that currently uses "--ignore=tests" so
it doesn't exclude the test suite; replace the ignore with a narrower path like
"--ignore=tests/integration" (or remove the --ignore entirely) so tests/ are
collected; e.g., change the command string to use "--ignore=tests/integration
--cov=. tests/ --cov-fail-under=80 --cov-report=html".
♻️ Duplicate comments (1)
.github/workflows/test.yml (1)
107-107: Critical: pytest command is broken — it ignores the test directory it's supposed to run.The command specifies
tests/as the test path but then adds--ignore=testsat the end, which will cause pytest to ignore all tests entirely. This will result in no tests being executed while the job still passes.Based on the past review comment, the intent was to exclude integration tests from coverage. The correct fix should use
--ignore=tests/integrationto exclude only integration tests while still running unit tests.🐛 Proposed fix
- run: pytest --cov=. -v -m "not integration" tests/ --cov-fail-under=80 --ignore=tests + run: pytest --cov=. -v -m "not integration" --ignore=tests/integration tests/ --cov-fail-under=80
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/test.ymlDEVELOPER.md
🧰 Additional context used
📓 Path-based instructions (1)
!(tests)/**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Run Pylint on tracked Python files, excluding tests/, and aim for score 9.5 or higher
Files:
.github/workflows/test.ymlDEVELOPER.md
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Mock GitHubRepository and environment variables; do not call the real GitHub API in unit tests
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to !(tests)/**/*.py : Run Pylint on tracked Python files, excluding tests/, and aim for score 9.5 or higher
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Use pytest-cov and keep coverage at or above 80 percent
Applied to files:
.github/workflows/test.ymlDEVELOPER.md
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Use pytest with tests located in tests/
Applied to files:
DEVELOPER.md
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Mock GitHubRepository and environment variables; do not call the real GitHub API in unit tests
Applied to files:
DEVELOPER.md
🔇 Additional comments (5)
.github/workflows/test.yml (2)
47-47: LGTM!The Pylint command now correctly excludes the
tests/directory, aligning with the coding guidelines that specify running Pylint on tracked Python files excluding tests.
109-133: LGTM!The new integration-test job is well-structured with proper checkout, Python setup, and dependency installation. Running integration tests separately without coverage requirements is appropriate since these are end-to-end tests that validate subprocess execution rather than code coverage.
DEVELOPER.md (3)
9-9: LGTM!Good addition of the navigation item for the new integration tests section.
195-199: LGTM!Clear documentation update specifying that unit tests are under
tests/unit/with the appropriate command to run them.
206-227: LGTM!Comprehensive documentation for the new integration testing capability. The section clearly explains:
- Location of tests and the pytest marker used
- How tests work (subprocess execution with patched GitHubRepository)
- Environment variables used for inputs
- Commands to run integration tests and exclude them
This aligns well with the learnings that GitHubRepository and environment variables should be mocked in tests.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
tmikula-dev
left a comment
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.
Please react to the PR comments.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@version_tag_check/utils/contanst.py`:
- Around line 1-21: Rename the module contanst.py to constants.py and update the
three import statements that reference the old module name to import from
constants instead; inside the renamed module add explicit type annotations to
the module-level constants by changing ERROR_TAG_ALREADY_EXISTS and
ERROR_TAG_DOES_NOT_EXIST to have the str type (ERROR_TAG_ALREADY_EXISTS: str and
ERROR_TAG_DOES_NOT_EXIST: str) so other code importing these symbols uses the
correctly-typed constants.
🧹 Nitpick comments (1)
tests/integration/test_local_run.py (1)
41-47: Consider adding a timeout to subprocess calls.If
main.pyhangs unexpectedly, these tests would block indefinitely. Adding a reasonable timeout prevents CI from stalling.♻️ Suggested improvement
result = subprocess.run( [sys.executable, str(PROJECT_ROOT / "main.py")], cwd=PROJECT_ROOT, env=env, capture_output=True, text=True, + timeout=30, )Also applies to: 67-73
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/workflows/test.yml.pylintrcpyproject.tomltests/integration/test_local_run.pytests/unit/test_version_tag_check_action.pyversion_tag_check/utils/contanst.pyversion_tag_check/version_tag_check_action.py
🚧 Files skipped from review as they are similar to previous changes (2)
- pyproject.toml
- tests/unit/test_version_tag_check_action.py
🧰 Additional context used
📓 Path-based instructions (5)
version_tag_check/**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
version_tag_check/**/*.py: Do not change existing error messages or log texts without a good reason, because tests check them
Add type hints for new public functions and classes
Use logging, not print, and keep logging wired through version_tag_check.utils.logging_config
Keep error messages stable; tests assert on exact strings
Files:
version_tag_check/utils/contanst.pyversion_tag_check/version_tag_check_action.py
**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.py: Target Python 3.11 or later
Format with Black using pyproject.toml
Run mypy and prefer fixing types instead of ignoring errors
Files:
version_tag_check/utils/contanst.pytests/integration/test_local_run.pyversion_tag_check/version_tag_check_action.py
!(tests)/**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Run Pylint on tracked Python files, excluding tests/, and aim for score 9.5 or higher
Files:
version_tag_check/utils/contanst.py.pylintrctests/integration/test_local_run.py.github/workflows/test.ymlversion_tag_check/version_tag_check_action.py
tests/**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
tests/**/*.py: Use pytest with tests located in tests/
Test behaviour: return values, raised errors, log messages, exit codes
Mock GitHubRepository and environment variables; do not call the real GitHub API in unit tests
Use pytest-cov and keep coverage at or above 80 percent
Files:
tests/integration/test_local_run.py
version_tag_check/version_tag_check_action.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Route new behaviour that affects action inputs or outputs through VersionTagCheckAction
Files:
version_tag_check/version_tag_check_action.py
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Mock GitHubRepository and environment variables; do not call the real GitHub API in unit tests
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/**/*.py : Do not change existing error messages or log texts without a good reason, because tests check them
Applied to files:
version_tag_check/utils/contanst.pytests/integration/test_local_run.pyversion_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/**/*.py : Keep error messages stable; tests assert on exact strings
Applied to files:
version_tag_check/utils/contanst.pytests/integration/test_local_run.pyversion_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/version.py|version_tag_check/version_validator.py : Keep Version and NewVersionValidator free of I/O and environment access
Applied to files:
version_tag_check/utils/contanst.pyversion_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/**/*.py : Add type hints for new public functions and classes
Applied to files:
version_tag_check/utils/contanst.pyversion_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to main.py|version_tag_check/version_tag_check_action.py : Do not change exit codes for existing failure scenarios
Applied to files:
version_tag_check/utils/contanst.pytests/integration/test_local_run.pyversion_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to !(tests)/**/*.py : Run Pylint on tracked Python files, excluding tests/, and aim for score 9.5 or higher
Applied to files:
.pylintrc.github/workflows/test.yml
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/test_version.py|tests/test_version_validator.py|tests/test_version_tag_check_action.py : When touching version parsing or increment rules, extend tests in tests/test_version.py, tests/test_version_validator.py, tests/test_version_tag_check_action.py
Applied to files:
tests/integration/test_local_run.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Mock GitHubRepository and environment variables; do not call the real GitHub API in unit tests
Applied to files:
tests/integration/test_local_run.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to tests/**/*.py : Use pytest-cov and keep coverage at or above 80 percent
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to **/*.py : Run mypy and prefer fixing types instead of ignoring errors
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to **/*.py : Target Python 3.11 or later
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/version_tag_check_action.py : Route new behaviour that affects action inputs or outputs through VersionTagCheckAction
Applied to files:
version_tag_check/version_tag_check_action.py
📚 Learning: 2025-12-15T11:23:24.034Z
Learnt from: CR
Repo: AbsaOSS/version-tag-check PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-15T11:23:24.034Z
Learning: Applies to version_tag_check/**/*.py : Use logging, not print, and keep logging wired through version_tag_check.utils.logging_config
Applied to files:
version_tag_check/version_tag_check_action.py
🧬 Code graph analysis (2)
tests/integration/test_local_run.py (2)
tests/integration/conftest.py (1)
subprocess_env_with_mocked_github(13-43)version_tag_check/version_tag_check_action.py (1)
run(53-91)
version_tag_check/version_tag_check_action.py (1)
version_tag_check/utils/gh_action.py (1)
set_action_failed(40-49)
🪛 Ruff (0.14.11)
tests/integration/test_local_run.py
33-33: Possible hardcoded password assigned to: "INPUT_GITHUB_TOKEN"
(S105)
41-41: subprocess call: check for execution of untrusted input
(S603)
62-62: Possible hardcoded password assigned to: "INPUT_GITHUB_TOKEN"
(S105)
67-67: subprocess call: check for execution of untrusted input
(S603)
🔇 Additional comments (9)
.pylintrc (1)
49-49: Redundant but harmless configuration.Both
ignore=CVS,tests(line 49) andignore-paths=tests(line 117) exclude the tests directory. Theignoredirective matches base names whileignore-pathsmatches path patterns. Having both provides belt-and-suspenders coverage, which is fine.Also applies to: 117-117
version_tag_check/version_tag_check_action.py (2)
24-24: Good refactoring to use centralized constants.The import references the
contanstmodule (typo noted in separate comment). The actual error strings remain stable, which aligns with the coding guideline to keep error messages consistent for test assertions.
73-80: LGTM: Error handling uses centralized constants.The tag existence checks now use
ERROR_TAG_ALREADY_EXISTSandERROR_TAG_DOES_NOT_EXISTconstants instead of hardcoded strings. This improves maintainability while preserving the existing behavior and exit codes..github/workflows/test.yml (3)
24-26: Good addition of concurrency control.The concurrency block prevents redundant workflow runs on the same PR, canceling in-progress runs when new commits are pushed.
110-111: Unit test configuration looks correct.The pytest command properly excludes integration tests with
-m "not integration"and maintains the 80% coverage threshold requirement.
113-137: Integration test job properly isolated.The dedicated integration-test job runs only integration-marked tests from
tests/integration/. No coverage collection here is appropriate since integration tests exercise end-to-end behavior rather than unit coverage.tests/integration/test_local_run.py (3)
1-18: Good integration test structure.The module docstring clearly explains the test approach and mocking strategy. The imports and PROJECT_ROOT setup are appropriate.
21-49: Test covers successful new version scenario.The test properly:
- Uses the
@pytest.mark.integrationmarker- Leverages the
subprocess_env_with_mocked_githubfixture- Sets appropriate environment variables for action inputs
- Validates exit code 0 with helpful assertion message
The
INPUT_GITHUB_TOKEN = "fake-token"is intentionally a dummy value for testing (not a real credential), so the S105 static analysis warning is a false positive.
52-76: Test covers failure scenario for existing tag.The test correctly:
- Uses the existing tag
v0.1.0(present in DummyGitHubRepository)- Asserts non-zero exit code
- Uses the centralized
ERROR_TAG_ALREADY_EXISTSconstant for output validationThis aligns with the coding guideline to use constants instead of hardcoded strings for test assertions.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Overview
This pull request introduces a structured integration testing approach, improves test organization, and refines the CI workflow to clearly separate unit and integration test execution. The goal is to increase confidence in end-to-end behavior while keeping fast feedback from unit tests.
Key outcomes:
Testing infrastructure improvements
Added a dedicated integration test suite in
tests/integration/test_local_run.pythat executesmain.pyas a subprocess.This simulates real GitHub Action execution by passing inputs via environment variables and validates the full execution path.
Introduced
tests/integration/dummy_github_repository.py, a dummyGitHubRepositoryimplementation used by integration tests.This allows realistic behavior without real network calls or external dependencies.
Updated
pyproject.tomlto register a customintegrationpytest marker, enabling explicit selection and separation of integration-style tests.Reorganized existing unit tests and fixtures under
tests/unit/to clearly distinguishCI workflow enhancements
Updated
.github/workflows/test.ymlto explicitly separate test execution:-m "not integration"integration-testjob runs only integration testsAdjusted the Pylint configuration in CI to ignore test files, reducing noise and keeping linting focused on production code.
This structure improves CI reliability, keeps unit test feedback fast, and ensures integration tests run in an environment closer to real usage.
Release Notes
Related
Closes #47
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.