Skip to content

Fix broken tests and add GitHub Actions CI#36

Merged
ashleyzhang01 merged 4 commits intomainfrom
fix-tests-and-ci
May 1, 2026
Merged

Fix broken tests and add GitHub Actions CI#36
ashleyzhang01 merged 4 commits intomainfrom
fix-tests-and-ci

Conversation

@ashleyzhang01
Copy link
Copy Markdown
Contributor

@ashleyzhang01 ashleyzhang01 commented Apr 30, 2026

  • Fix 4 test failures caused by code changes not reflected in tests
  • Add pytest to offline dev dependencies
  • Add GitHub Actions workflow running tests + ruff for both offline and online/etl
  • Fix ruff errors

Copy link
Copy Markdown

Copilot AI left a 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 PR fixes failing tests and introduces a GitHub Actions CI workflow to run linting and tests for both the offline and online/etl subprojects.

Changes:

  • Refactors/cleans up test imports and a few unused variables to resolve test failures and Ruff violations.
  • Replaces explicit CancelledError handling with contextlib.suppress(...) in async progress tasks.
  • Adds CI workflow running ruff check + pytest for offline and online/etl, and adds pytest to offline dev dependencies.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
online/etl/tests/test_volumes.py Import normalization / Ruff-isort compliance in tests.
online/etl/tests/test_schemas.py Import normalization / Ruff-isort compliance in tests.
online/etl/tests/test_repository.py Import split for Ruff-isort compliance.
online/etl/tests/test_quality_signals.py Import normalization / Ruff-isort compliance in tests.
online/etl/tests/test_pr_author_extraction.py Import normalization / Ruff-isort compliance in tests.
online/etl/tests/test_label.py Removes unused pytest import and normalizes imports.
online/etl/tests/test_discover.py Import normalization / Ruff-isort compliance in tests.
online/etl/tests/test_connection.py Import normalization and fixes unused variable warnings in assertions.
online/etl/tests/test_backfill_pr_author.py Import split for Ruff-isort compliance.
online/etl/tests/test_assemble.py Import normalization and string literal quote normalization.
online/etl/pipeline/enrich.py Removes unused exception binding in TokenInvalidError handler.
online/etl/pipeline/backfill_pr_author.py Uses contextlib.suppress for CancelledError; import cleanup.
online/etl/main.py Uses contextlib.suppress for CancelledError; minor constant → variable rename in batching logic.
offline/tests/test_step3.py Updates dummy CLI args namespace to match new arguments.
offline/tests/test_step1.py Updates test stubs/fixtures to match updated API expectations (e.g., user field, extra arg).
offline/tests/test_step0.py Adds stub for newly expected make_repo_public method in tests.
offline/pyproject.toml Adds pytest to dev dependency group.
offline/code_review_benchmark/step_speed_analysis.py Refactors imports/formatting and adjusts timestamp parsing timezone handling.
offline/code_review_benchmark/step2_5_dedup_candidates.py Uses zip(..., strict=True) and minor output formatting tweak.
.github/workflows/tests.yml Adds CI workflow to run Ruff + pytest for both subprojects using uv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 173 to 179
def _parse_dt(s: str | None) -> datetime | None:
if not s:
return None
for fmt in ("%Y-%m-%dT%H:%M:%SZ", "%Y-%m-%dT%H:%M:%S+00:00", "%Y-%m-%dT%H:%M:%S.%fZ"):
try:
return datetime.strptime(s, fmt).replace(tzinfo=timezone.utc)
return datetime.strptime(s, fmt).replace(tzinfo=UTC)
except ValueError:
working-directory: online/etl
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
@ashleyzhang01 ashleyzhang01 merged commit 807d469 into main May 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants