Skip to content

Commit

Permalink
Merge branch 'master' into ofek/up
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Apr 13, 2023
2 parents e96a3a8 + 3bbc9e4 commit a8c16a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
runs-on: ${{ fromJson(inputs.runner) }}

env:
FORCE_COLOR: "1"
PYTHON_VERSION: "${{ inputs.python-version || '3.8' }}"
SKIP_ENV_NAME: "${{ (inputs.test-py2 && !inputs.test-py3) && 'py3.*' || (!inputs.test-py2 && inputs.test-py3) && 'py2.*' || '' }}"
# Windows E2E requires Windows containers
Expand Down
12 changes: 9 additions & 3 deletions ddev/src/ddev/utils/scripts/ci_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
""",
re.VERBOSE,
)
NON_TESTABLE_FILES = {'auto_conf.yaml', 'agent_requirements.in'}
AGENT_REQUIREMENTS_FILE = 'datadog_checks_base/datadog_checks/base/data/agent_requirements.in'
NON_TESTABLE_FILES = {'auto_conf.yaml'}
DISPLAY_ORDER_OVERRIDE = {
_d: _i
for _i, _d in enumerate(
Expand Down Expand Up @@ -133,7 +134,11 @@ def get_changed_targets(root: Path, *, ref: str, local: bool, verbose: bool) ->
if verbose:
print('\n'.join(changed_files), file=sys.stderr)

if (root / 'datadog_checks_base').is_dir() and any(SKIPPED_PATTERN.search(path) for path in changed_files):
if (
(root / 'datadog_checks_base').is_dir()
and AGENT_REQUIREMENTS_FILE not in changed_files
and any(SKIPPED_PATTERN.search(path) for path in changed_files)
):
return []

changed_directories: defaultdict[str, list[str]] = defaultdict(list)
Expand All @@ -142,6 +147,7 @@ def get_changed_targets(root: Path, *, ref: str, local: bool, verbose: bool) ->
if remaining_path:
changed_directories[directory_name].append(remaining_path)

agent_requirements_file = root / AGENT_REQUIREMENTS_FILE
targets = []
for directory_name, files in changed_directories.items():
directory = root / directory_name
Expand All @@ -150,7 +156,7 @@ def get_changed_targets(root: Path, *, ref: str, local: bool, verbose: bool) ->

for remaining_path in files:
possible_file = directory / remaining_path
if possible_file.name in NON_TESTABLE_FILES:
if possible_file.name in NON_TESTABLE_FILES or possible_file == agent_requirements_file:
continue
elif TESTABLE_FILE_PATTERN.search(remaining_path):
targets.append(directory_name)
Expand Down

0 comments on commit a8c16a4

Please sign in to comment.