Skip to content

Commit

Permalink
testing: Adding rules to run all ITs on dependencies changes
Browse files Browse the repository at this point in the history
Adding rules to ensure that all integration tests are run
when any file with project dependencies is modified.

Signed-off-by: Alexey Ovchinnikov <[email protected]>
  • Loading branch information
a-ovchinnikov committed Oct 24, 2024
1 parent 918c3d0 commit 62c72a2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@

# Individual files could be added to the set as well.
PATHS_TO_CODE = frozenset(
(Path("cachi2"), Path("tests/integration"), Path("Dockerfile"), Path("Containerfile"))
(
Path("cachi2"),
Path("tests/integration"),
Path("Dockerfile"),
Path("Containerfile"),
Path("requirements.txt"),
Path("requirements-extras.txt"),
Path("pyproject.toml"),
)
)
SUPPORTED_PMS: frozenset[str] = frozenset(
list(resolver._package_managers) + list(resolver._dev_package_managers)
Expand Down Expand Up @@ -584,8 +592,12 @@ def is_testable_code(c: Path) -> bool:
True
>>> is_testable_code(Path('README.md'))
False
>>> is_testable_code(Path('reqruiements.txt'))
False
>>> is_testable_code(Path('requirements.txt'))
True
>>> is_testable_code(Path('pyproject.toml'))
True
>>> is_testable_code(Path('requirements-extras.txt'))
True
>>> is_testable_code(Path('Dockerfile'))
True
>>> is_testable_code(Path('Containerfile'))
Expand Down

0 comments on commit 62c72a2

Please sign in to comment.