Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions run_dagger_develop.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Get the current working directory
$rootDir = Get-Location

Write-Host "🔍 Searching for 'dagger.json' files..."

# Recursively search for dagger.json files
$daggerFiles = Get-ChildItem -Path $rootDir -Recurse -Filter "dagger.json"

if ($daggerFiles.Count -eq 0) {
Write-Host "⚠️ No 'dagger.json' files found. Exiting..." -ForegroundColor Yellow
exit 0
}

# Run in each directory where dagger.json is found
foreach ($file in $daggerFiles) {
$directory = $file.DirectoryName
Write-Host "📂 Entering directory: $directory"
Push-Location $directory

Write-Host "🚀 Running 'dagger develop'..."
try {
dagger develop

if ($LASTEXITCODE -ne 0) {
Write-Host "❌ 'dagger develop' failed in $directory" -ForegroundColor Red
} else {
Write-Host "✅ 'dagger develop' completed successfully in $directory" -ForegroundColor Green
}
} catch {
Write-Host "🔥 An error occurred while running 'dagger develop' in `${directory}: $_" -ForegroundColor Red
} finally {
Pop-Location
}
}

Write-Host "🎉 All 'dagger develop' executions completed!"
42 changes: 42 additions & 0 deletions run_dagger_tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,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!"
Loading