Skip to content

Add CI quality checks#7

Merged
LRriver merged 2 commits into
mainfrom
dev
Jun 29, 2026
Merged

Add CI quality checks#7
LRriver merged 2 commits into
mainfrom
dev

Conversation

@LRriver

@LRriver LRriver commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add GitHub Actions CI for frontend and backend checks on main and dev.
  • Configure Ruff linting/format checks and a pytest coverage baseline.
  • Document local development check commands in both English and Chinese READMEs.

Validation

  • ruff check api src tests main.py
  • ruff format --check api src tests main.py
  • python -m pytest --cov=api --cov=src --cov-report=term-missing
  • npm ci
  • npm run lint
  • npm run test
  • npm run build

Notes

  • The initial Python coverage gate is set to 45%, matching the current tested baseline of 46.23%.
  • Real model API calls are intentionally excluded from default CI because they require private keys and depend on external service availability.
  • npm audit is not included as a blocking CI step yet because the existing dependency tree currently reports known vulnerabilities that should be handled in a separate dependency-upgrade pass.

- add GitHub Actions jobs for frontend and backend verification

- configure Ruff formatting and pytest coverage baseline

- document local development check commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces development check documentation in the README files, adds a pyproject.toml configuration for Ruff and pytest, introduces a requirements-dev.txt file, and applies code formatting across the codebase. Feedback from the review highlights critical issues in the FastAPI routes, specifically potential temporary file leaks in api/routes/edit.py and event loop blocking caused by synchronous I/O operations in both api/routes/edit.py and api/routes/export.py. The reviewer recommends running these synchronous operations in a separate thread using asyncio.to_thread and restructuring the cleanup logic to ensure temporary files are always deleted.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread api/routes/edit.py
Comment thread api/routes/export.py
- run image edit and export work through asyncio.to_thread

- always clean edit temp files on intermediate failures

- cover async route offloading and cleanup behavior
@LRriver LRriver merged commit 2416086 into main Jun 29, 2026
6 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.

1 participant