File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches : [main]
66 paths :
7- - ' validators/**'
8- - ' gitinfo.schema.json'
9- - ' examples/**'
10- - ' .github/workflows/test-validators.yml'
7+ - " validators/**"
8+ - " gitinfo.schema.json"
9+ - " examples/**"
10+ - " .github/workflows/test-validators.yml"
1111 pull_request :
1212 branches : [main]
1313 paths :
14- - ' validators/**'
15- - ' gitinfo.schema.json'
16- - ' examples/**'
17- - ' .github/workflows/test-validators.yml'
14+ - " validators/**"
15+ - " gitinfo.schema.json"
16+ - " examples/**"
17+ - " .github/workflows/test-validators.yml"
1818 workflow_dispatch :
1919
2020jobs :
@@ -69,13 +69,13 @@ jobs:
6969 shell : pwsh
7070 run : |
7171 '{"invalid_field": "should fail"}' | Set-Content /tmp/invalid.gitinfo
72- try {
73- ./validators/powershell/Validate-GitInfo.ps1 -Path /tmp/invalid.gitinfo
74- Write-Error "Expected validation to fail but it passed"
72+ ./validators/powershell/Validate-GitInfo.ps1 -Path /tmp/invalid.gitinfo
73+ if ($LASTEXITCODE -eq 0) {
74+ Write-Host "Expected validation to fail but it passed"
7575 exit 1
76- } catch {
77- Write-Host "Correctly detected invalid file"
7876 }
77+ Write-Host "Correctly detected invalid file"
78+ exit 0
7979
8080 test-bash :
8181 name : Test Bash Validator
You can’t perform that action at this time.
0 commit comments