Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] prevent C API tests from leaving files behind (fixes #6361) #6637

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Sep 3, 2024

fixes #6361

I was testing whether #6361 could be closed by recent PRs, and realized that I'd missed one local file when listing the test files there... "preb.txt", created by the C API tests.

This does the following:

  • ensures that file isn't left behind
  • changes all uses of "preb" to "preds" (it always refers to predictions, so I think "preb" was just a typo)

Notes for Reviews

How I tested this

Ran all the tests locally (on my Mac, with all optional dependencies installed)

# Python and C API tests
sh build-python.sh install
pytest tests/

# R tests
sh build-cran-package.sh --no-build-vignettes
MAKEFLAGS="-j4" R CMD INSTALL --with-keep.source ./lightgbm*.tar.gz
cd R-package/tests
Rscript testthat.R

# C++ tests
rm -rf ./build
cmake -B build -S . -DBUILD_CPP_TEST=ON -DUSE_OPENMP=OFF
cmake --build build --target testlightgbm -j4
./testlightgbm

Checked that no files were left behind.

# look for local files (including those ignored by git)
git check-ignore -v -- *
git status --ignored

@jameslamb jameslamb merged commit 41ba9e8 into master Sep 4, 2024
44 checks passed
@jameslamb jameslamb deleted the ci/python-test-files branch September 4, 2024 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ci] [python-package] Python tests leave files behind
2 participants