-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_dagger_tests.ps1
More file actions
42 lines (35 loc) · 1.07 KB
/
Copy pathrun_dagger_tests.ps1
File metadata and controls
42 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# List of modules
$modules = @(
"actionlint",
"editorconfig",
"hadolint",
"hello",
"quarto",
"revive",
"ruff",
"shellcheck",
"ssh-manager",
"yamllint"
)
# Get the current working directory
$rootDir = Get-Location
# Run tests in each module's test directory
foreach ($module in $modules) {
$testPath = Join-Path $rootDir $module "test"
if (Test-Path $testPath -PathType Container) {
Write-Host "📂 Entering test directory: $testPath"
Set-Location $testPath
Write-Host "🚀 Running 'dagger call all' in $module/test..."
dagger call all
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Dagger tests failed in $module/test" -ForegroundColor Red
} else {
Write-Host "✅ Dagger tests passed in $module/test" -ForegroundColor Green
}
# Return to the root directory
Set-Location $rootDir
} else {
Write-Host "⚠️ Test directory not found: $testPath, skipping..." -ForegroundColor Yellow
}
}
Write-Host "🎉 All Dagger tests completed!"