Skip to content

Commit

Permalink
Fix CI path detection for changed files (NVIDIA-Merlin#1124)
Browse files Browse the repository at this point in the history
* Fix CI path detection for changed files

* modify a file in xgb directory

* check if full name exists in mapping

* Revert "modify a file in xgb directory"

This reverts commit 3dc918c.

* modify a file in xgb directory

---------

Co-authored-by: Marc Romeyn <[email protected]>
  • Loading branch information
edknv and marcromeyn authored May 29, 2023
1 parent 780949f commit 7a6086d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion merlin/models/xgb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def dask_client() -> distributed.Client:

def pytest_collection_modifyitems(items):
changed_backends = ci_utils.get_changed_backends()
full_name_to_alias = {v: k for k, v in ci_utils.BACKEND_ALIASES.items()}

for item in items:
path = item.location[0]
Expand All @@ -99,6 +100,8 @@ def pytest_collection_modifyitems(items):
item.add_marker(getattr(pytest.mark, marker))

for changed in changed_backends:
if changed in full_name_to_alias:
changed = full_name_to_alias[changed]
if f"/{changed}/" in path:
item.add_marker(pytest.mark.changed)

Expand Down

0 comments on commit 7a6086d

Please sign in to comment.