Skip to content

Add Github Actions for CI workflow on A2 910b#112

Merged
chloroethylene merged 16 commits intoLMCache:mainfrom
matthewygf:main
Jan 5, 2026
Merged

Add Github Actions for CI workflow on A2 910b#112
chloroethylene merged 16 commits intoLMCache:mainfrom
matthewygf:main

Conversation

@matthewygf
Copy link
Copy Markdown
Collaborator

@matthewygf matthewygf commented Jan 1, 2026

Addresses and Fixes #23

This pull request introduces significant improvements to the project's development workflow, code quality enforcement, and benchmark analysis tooling. The key changes include adding comprehensive CI workflows for linting and testing on Ascend 910B hardware, automating test result reporting, enforcing consistent code style with pre-commit hooks and configuration, and refactoring benchmark analysis scripts for clarity and maintainability.

CI/CD and Test Automation:

  • Added a new GitHub Actions workflow (.github/workflows/build-and-test.yml) for linting, style checks, and running unit tests on Ascend 910B hardware, including artifact uploads for debugging and test results.
  • Introduced a test result reporting workflow (.github/workflows/report-test-results.yml) that automatically publishes JUnit test reports from CI runs, improving visibility into test outcomes.

Code Quality and Style Enforcement:

  • Established a pre-commit configuration (.pre-commit-config.yaml) integrating tools such as isort, ruff, codespell, clang-format, and mypy, ensuring consistent code formatting, linting, type checking, and license header validation.
  • Added an isort configuration file (.isort.cfg) to enforce import order and grouping according to the "black" profile and project conventions.
  • Both are from upstream.

Benchmark Analysis Refactoring:

  • Refactored benchmark/v1/rag/analysis.py for improved readability, consistent code style, and better error handling; added SPDX license headers and reorganized imports.
  • Improved import organization and added SPDX license headers to benchmark/v1/rag/rag.py for compliance and clarity.
    Documentation:
  • Fixed minor spelling errors in README.md for improved clarity.

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
* Add Pre-commit lint & build test workflow action
---------

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
- because the host-ip variable cannot work here yet, so temporarily pass for the bridgeip

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
@matthewygf matthewygf changed the title Add Github Actions for CI workflow Add Github Actions for CI workflow on A2 910b Jan 1, 2026
@matthewygf matthewygf marked this pull request as ready for review January 1, 2026 20:54
Copy link
Copy Markdown
Contributor

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 pull request introduces GitHub Actions CI workflow for Ascend 910B hardware, adds pre-commit hooks for code quality enforcement, and performs extensive code style improvements across Python and C++ files. The changes include adding SPDX license headers, organizing imports consistently, and reformatting code to follow best practices.

Key Changes:

  • Added SPDX header checking tool and applied headers across all files
  • Introduced pre-commit configuration with linters (isort, ruff, codespell, clang-format, mypy)
  • Reorganized Python imports using isort with Black-compatible configuration
  • Reformatted C++ code with consistent style and improved readability
  • Fixed minor typo in README ("maintainence" → "maintenance")

Reviewed changes

Copilot reviewed 73 out of 74 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tools/check_spdx_header.py New script to check and add SPDX headers to Python files
.isort.cfg Configuration for Python import sorting consistent with Black style
tests/**/*.py Updated imports, added SPDX headers, improved formatting
lmcache_ascend/**/*.py Added SPDX headers, reorganized imports, formatting improvements
csrc/**/*.{h,cpp} C++ code reformatted with consistent style and spacing
benchmark/v1/rag/*.py Refactored for readability with improved formatting
README.md Fixed typo: "maintainence" → "maintenance"

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

Comment thread lmcache_ascend/integration/vllm/lmcache_ascend_connector_v1.py
Comment thread lmcache_ascend/__init__.py
Comment thread lmcache_ascend/integration/vllm/lmcache_ascend_connector_v1.py
Comment thread lmcache_ascend/integration/vllm/lmcache_ascend_connector_v1.py
Comment thread tests/v1/test_cache_engine.py
Comment thread tests/v1/storage_backend/test_fs_connector.py
Comment thread tests/v1/test_memory_management.py
Comment thread tests/v1/test_remote_mla_worker_id_as0.py
Comment thread tests/v1/test_token_database.py
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
@matthewygf matthewygf marked this pull request as draft January 1, 2026 21:05
Removed the test report publishing step from the workflow.

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
@matthewygf matthewygf marked this pull request as ready for review January 2, 2026 11:35
Copilot AI review requested due to automatic review settings January 2, 2026 11:35
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.


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

@matthewygf matthewygf force-pushed the main branch 4 times, most recently from 614a573 to 52d684c Compare January 2, 2026 13:43
Copilot AI review requested due to automatic review settings January 2, 2026 13:50
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.


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

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Copilot AI review requested due to automatic review settings January 5, 2026 10:04
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.


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

Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
@chloroethylene
Copy link
Copy Markdown
Collaborator

Leave a unit test error for now; we'll fix it in a later PR.

@chloroethylene chloroethylene merged commit c581351 into LMCache:main Jan 5, 2026
1 of 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.

CI/CD build for LMCache-Ascend containers

3 participants