Skip to content

Commit

Permalink
ci: Skip package build on tox runs (#5210)
Browse files Browse the repository at this point in the history
Building a wheel/sdist generally adds 5+ seconds to every tox run.
This is unnecessary because a built package isn't needed to run any
of the CI tasks.

Also remove the `recreate` line as it wasn't doing anything. To work
correctly, it should be defined under `[testenv]`,
not `[tox]`.
  • Loading branch information
TheRealFalcon committed Apr 26, 2024
1 parent 8e7f983 commit acc68de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Needed generally in tests

-r requirements.txt

# Avoid breaking change in `testpaths` treatment forced
# test/unittests/conftest.py to be loaded by our integration-tests tox env
# resulting in an unmet dependency issue:
Expand Down
6 changes: 2 additions & 4 deletions tools/read-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def parse_pip_requirements(requirements_path):
with open(requirements_path, "r") as fp:
for line in fp:
line = line.strip()
if not line or line.startswith("#"):
if not line or line.startswith(("#", "-r ")):
continue

# remove pip-style markers
Expand All @@ -212,9 +212,7 @@ def parse_pip_requirements(requirements_path):
# remove version requirements
version_comparison = re.compile(r"[~!>=.<]+")
if version_comparison.search(dep):
dep_names.append(
version_comparison.split(dep)[0].strip()
)
dep_names.append(version_comparison.split(dep)[0].strip())
else:
dep_names.append(dep)
return dep_names
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ envlist =
isort,
mypy,
pylint
recreate = True

[doc8]
ignore-path-errors=doc/rtd/topics/faq.rst;D001

[testenv]
package = skip
basepython = python3
setenv =
LC_ALL = en_US.utf-8
Expand Down

0 comments on commit acc68de

Please sign in to comment.