From e074006af8bb5bc231395362736a4f3a9953042e Mon Sep 17 00:00:00 2001 From: nstarman Date: Tue, 14 Jul 2026 15:34:56 -0400 Subject: [PATCH] Write coverage data to repo root for Codecov upload Tests run in a temporary directory (changedir = .tmp/{envname}), so pytest-cov wrote the .coverage data file inside that temp dir. The OpenAstronomy tox workflow now requires the .coverage file to be in the repository root in order to combine reports and upload to Codecov, causing CI to fail with "No .coverage file was found in the root directory" / "No coverage reports found". Set COVERAGE_FILE = {toxinidir}/.coverage for coverage environments so the data file lands in the root, as documented at https://github-actions-workflows.openastronomy.org/en/stable/tox.html#coverage Co-Authored-By: Claude Opus 4.8 --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 9025982..1a6a7b0 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,11 @@ indexserver = # Suppress display of matplotlib plots generated during docs build setenv = clocale: LC_ALL = C + # Tests run in a temporary directory (see changedir below), so point the + # coverage data file back at the repo root. The OpenAstronomy tox workflow + # requires the .coverage file to be in the root to combine and upload it. + # https://github-actions-workflows.openastronomy.org/en/stable/tox.html#coverage + cov: COVERAGE_FILE = {toxinidir}/.coverage # Pass through the following environment variables which may be needed for the CI passenv = HOME, WINDIR, LC_ALL, LC_CTYPE, CC, CI, IS_CRON, ARCH_ON_CI