Skip to content

[CI] Add GitHub Actions lint workflow#18809

Merged
tqchen merged 1 commit into
apache:mainfrom
tqchen:gh-lint-workflow
Feb 22, 2026
Merged

[CI] Add GitHub Actions lint workflow#18809
tqchen merged 1 commit into
apache:mainfrom
tqchen:gh-lint-workflow

Conversation

@tqchen

@tqchen tqchen commented Feb 22, 2026

Copy link
Copy Markdown
Member

This PR adds a GitHub Actions workflow that runs pre-commit hooks and removes the need on jenkins to do lint

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @tqchen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the continuous integration pipeline by transitioning the linting process from a Jenkins-based system to a GitHub Actions workflow. This change aims to streamline the development process by integrating lint checks directly into the GitHub platform, making them more accessible and efficient for contributors. It also updates project dependencies to support the new linting setup.

Highlights

  • CI Workflow Migration: The linting process has been migrated from Jenkins to a new GitHub Actions workflow, eliminating the dependency on Jenkins for lint checks.
  • Dependency Management: A new development dependency group has been introduced in pyproject.toml to include pre-commit, facilitating local linting setup.
  • ASF Configuration Update: The .asf.yaml configuration was updated to remove the lint/pr-head check, reflecting the shift in linting responsibility.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .asf.yaml
    • Removed 'lint/pr-head' from the list of required GitHub checks.
  • pyproject.toml
    • Added a new '[dependency-groups]' section.
    • Included 'pre-commit' as a 'dev' dependency.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/lint.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request aims to transition linting from Jenkins to GitHub Actions. However, the GitHub Actions workflow file itself is missing from the provided changes, which is the core part of the PR. Additionally, removing the mandatory lint check in .asf.yaml without adding the new GitHub Actions check name reduces CI enforcement. In pyproject.toml, the new dependency-groups section is redundant as pre-commit is already defined in optional-dependencies. Please ensure the GHA workflow is included and the status checks are correctly updated.

Comment thread .asf.yaml
Comment thread pyproject.toml Outdated
This PR adds a GitHub Actions workflow that runs pre-commit hooks
and removes the need on jenkins to do lint

@yongwww yongwww left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@tqchen tqchen merged commit 7ac12eb into apache:main Feb 22, 2026
11 checks passed
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 19, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 19, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 19, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
MasterJH5574 added a commit to MasterJH5574/mlc-llm that referenced this pull request Apr 20, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
tlopex pushed a commit to mlc-ai/mlc-llm that referenced this pull request Apr 22, 2026
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
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.

2 participants