From 78771de73e7a047d9fc67ba2e986fec6f5406acf Mon Sep 17 00:00:00 2001 From: spsarras Date: Fri, 29 Nov 2024 16:13:35 +0000 Subject: [PATCH] ci: added condition when both integration and units need to run --- impact-testing.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/impact-testing.yml b/impact-testing.yml index 6c4a20186..52eaba4c8 100644 --- a/impact-testing.yml +++ b/impact-testing.yml @@ -34,17 +34,22 @@ stages: git status $targetBranch = $(System.PullRequest.TargetBranch) - $gitChanges = git diff --name-only $targetBranch HEAD + $gitChanges = git diff --name-only HEAD..$targetBranch $unitTestsChanged = $false $integrationTestsChanged = $false foreach ($file in $gitChanges) { + # both need to run if ($file -like 'GsaGH/*') { $unitTestsChanged = $true + $integrationTestsChanged = $true } if ($file -like 'IntegrationTests/*') { $integrationTestsChanged = $true } + if ($file -like 'GsaGHTests/*') { + $unitTestsChanged = $true + } } Write-Output "Setting pipeline variables based on changes detected..."