Skip to content

Commit

Permalink
ci: added condition when both integration and units need to run
Browse files Browse the repository at this point in the history
  • Loading branch information
psarras committed Nov 29, 2024
1 parent 3ab8f31 commit 78771de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion impact-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit 78771de

Please sign in to comment.