Add more AKS metrics #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Validate schema and casing' | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'metrics.json' | |
pull_request: | |
jobs: | |
test: | |
name: 'Validate metrics.json schema' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Ensure that all directories are lowercase' | |
id: lowercase | |
shell: pwsh | |
run: | | |
$directories = Get-ChildItem -Recurse -Path ./templates -Directory | |
foreach ($dir in $directories) { | |
if ($dir.Name -cne $dir.Name.ToLower()) { | |
Write-Error "Directory $dir must be lowercase!" | |
} | |
} | |
- name: 'Validate JSON Schema for metrics.json' | |
id: validation | |
shell: pwsh | |
run: | | |
$files = Get-ChildItem -Recurse | Where-Object { $_.Name -eq 'metrics.json' } | |
$files |% { | |
Write-Host "Found $($_.Fullname). Validate JSON Schema." | |
./.github/scripts/validateMetrics.ps1 -metricsFile $($_.FullName) | |
} |