-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate Yaml Validator into the CI to validate Persistence Test cas…
…es (#694)
- Loading branch information
1 parent
e0246be
commit cf28dff
Showing
5 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<# | ||
Validate's the Yaml Controls used by Persistence's Unit Tests | ||
Uses the repository's root as entry point (similar to how containers on github actions would) | ||
#> | ||
|
||
$AppTestDir = "..\Persistence.Tests\_TestData\AppsWithYaml" | ||
$ControlTestDir = "..\Persistence.Tests\_TestData\ValidYaml-CI" | ||
|
||
# come back to same directory after validation | ||
Push-Location | ||
|
||
Set-Location -Path "bin\Debug\YamlValidator" | ||
|
||
$AppTestResults = dotnet YamlValidator.dll validate --path $AppTestDir | ||
Write-Output "Validating Directory $AppTestDir `n" | ||
$AppTestResults | ||
|
||
$ControlTestResults = dotnet YamlValidator.dll validate --path $ControlTestDir | ||
Write-Output "Validating Directory $ControlTestDir `n" | ||
$ControlTestResults | ||
|
||
# restore location | ||
Pop-Location |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to validate whether persistence has valid tests | ||
|
||
cd bin/Debug/YamlValidator | ||
|
||
APP_TEST_DIR="../Persistence.Tests/_TestData/AppsWithYaml" | ||
CONTROL_TEST_DIR="../Persistence.Tests/_TestData/ValidYaml-CI" | ||
|
||
app_test_results=$(dotnet YamlValidator.dll validate --path $APP_TEST_DIR) | ||
printf "Validating Directory $APP_TEST_DIR \n" | ||
printf "$app_test_results" | ||
|
||
control_test_results=$(dotnet YamlValidator.dll validate --path $CONTROL_TEST_DIR) | ||
printf "Validating Directory $CONTROL_TEST_DIR \n" | ||
printf "$control_test_results" |
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
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