[ci] expand testing (tracking issue)
Description
The project has been getting many more contributions from first-time contributors recently (yay!). Expanding the testing, linting, etc. in the project would reduce the effort required to review those contributions, by automating more of the checks that human reviewers are currently responsible for.
It'd also help human contributors and LLMs to generate higher-quality first attempts at patches.
This issue tracks that work. I'm mainly opening it to collect links to other PRs for some work I'm planning, but please do comment if you have other ideas for testing areas that are missing in this project, or if you'd like to contribute.
Benefits of this work
- reduces effort to review contributions
- improves release confidence
- hopefully improves the quality of patches authored by automated tools like LLMs (cross-ref: #7434)
- will likely uncover existing bugs, performance issues, etc.
Approach
More auto-formatting
- C / C++ (
clang-format?) - R (
air?) - shell code (
shfmt?)
More linting / static analysis
- C/C++
-
cppcheck(#4539) -
clang-tidy(https://clang.llvm.org/extra/clang-tidy/)
-
- Dockerfiles (
hadolint?) - GitHub Actions
-
actionlint(https://github.com/rhysd/actionlint)
-
- Python
-
mypy: install optional dependencies to test against their types - doc strings (
pydoclintand/ornumpydocvalidation) - more
ruffrules (especiallyUPforpyupgrade)
-
- other miscellaneous linting / static analysis
Benchmarking speed / memory usage
- C++ (e.g.
google/benchmark) - Python
- memory usage (e.g.
memray/pytest-memray) - benchmarking (e.g.
asv,pytest-benchmark)
- memory usage (e.g.
Measuring + enforcing code coverage
- C++ (
gcov?) - Python (#7456)
- R (https://covr.r-lib.org/)
Expanded Runtime testing
- C API for a C-only program (https://github.com/lightgbm-org/LightGBM/issues/4609)
- fuzzing / property-based testing (e.g.
hypothesis,libfuzzer) -
lightgbmCLI - Python: import time testing (ref: #7327)
- NuGet package
- SWIG builds
Miscellaneous other things
- testing for ABI breaks in
lib_lightgbm - erroring on more compiler warnings, runtime warnings in unit tests, etc.
- build-only CUDA and ROCm CI job(s)
- to at least get some coverage of building, even if actually running is too expensive because it needs GPUs
Notes
I used LLMs to help identify areas in need of testing and possible tools that could help, but wrote this entire issue myself.
Source: lightgbm-org/LightGBM