Skip to content

Commit 4af24ad

Browse files
committed
Skip tests if there are none
1 parent 96129b0 commit 4af24ad

File tree

1 file changed

+5
-1
lines changed
  • .github/actions/version-bump-and-publish

1 file changed

+5
-1
lines changed

.github/actions/version-bump-and-publish/action.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ $env:PSModulePath = @($env:PSModulePath, $ThisModulePath) -join $separator
3838
if ($WhatIfPreference) {
3939
Write-Host "WhatIf: Would have run tests"
4040
} else {
41-
Invoke-Pester -Path $RepositoryRoot -CI -ExcludeTag "ExcludeCI"
41+
if (Test-Path "$RepositoryRoot\$ModuleName.Tests") {
42+
Invoke-Pester -Path $RepositoryRoot -CI -ExcludeTag "ExcludeCI"
43+
} else {
44+
Write-Host "Test project not found at $RepositoryRoot\$ModuleName.Tests, skipping tests"
45+
}
4246
}
4347

4448
# If last commit was the version bump, skip it

0 commit comments

Comments
 (0)