Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Yaml Validator into the CI to validate Persistence Test cases #694

Merged
merged 31 commits into from
Jul 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0dd2f74
add ci testing for yaml validation
abaskk-msft Jun 26, 2024
5cff03b
modifications to ci to run yaml validator on persistence tests. Also …
abaskk-msft Jun 27, 2024
b0be73b
test CI validator update
abaskk-msft Jun 27, 2024
df36869
add test runner, update CI filepaths
abaskk-msft Jun 28, 2024
d36b692
Merge branch 'master' into users/t-abaskar/yaml-validator-ci
abaskk-msft Jul 2, 2024
de22930
update ci script and add changes from master to test ci
abaskk-msft Jul 2, 2024
6591461
use absolute paths for ci script to work
abaskk-msft Jul 2, 2024
4b74b55
file unable to access give sudo perms
abaskk-msft Jul 2, 2024
ae653cb
debug output
abaskk-msft Jul 2, 2024
78a15ae
show all files in yamlValidator dir
abaskk-msft Jul 2, 2024
b48df29
add schema folder to ls echo. Comment out thins that consume CI minutes
abaskk-msft Jul 2, 2024
eeb40f3
cat file
abaskk-msft Jul 2, 2024
177c300
change file format
abaskk-msft Jul 2, 2024
2487b09
see if file inacessible due to permissions
abaskk-msft Jul 2, 2024
9bb1754
check if ci docker container doesn't have perms to access file
abaskk-msft Jul 3, 2024
b8e88cf
test ci with debug print statements
abaskk-msft Jul 3, 2024
669c4f0
=( ci file check again
abaskk-msft Jul 3, 2024
ad5c4cc
cd into running directory
abaskk-msft Jul 3, 2024
f069f29
cleaning out script
abaskk-msft Jul 3, 2024
7157971
add execute perms to shell script
abaskk-msft Jul 3, 2024
7e3ff87
relative filepath issue (maybe?)
abaskk-msft Jul 3, 2024
f3eeb11
more debugging
abaskk-msft Jul 3, 2024
34cac77
All paths from CI relative to root of repo
abaskk-msft Jul 3, 2024
1e5e4c8
run ci validation on windows
abaskk-msft Jul 3, 2024
0cfce9d
add powershell script for windows validation
abaskk-msft Jul 3, 2024
90666f8
run full updated CI workflow
abaskk-msft Jul 3, 2024
43f336c
remove unecessary validation
abaskk-msft Jul 3, 2024
381193b
small name change
abaskk-msft Jul 3, 2024
3818485
change CI test order
abaskk-msft Jul 3, 2024
d39f50c
run dll before yaml validation tests
abaskk-msft Jul 8, 2024
35b2ee9
Merge branch 'master' into users/t-abaskar/yaml-validator-ci
abaskk-msft Jul 8, 2024
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
Prev Previous commit
Next Next commit
run dll before yaml validation tests
abaskk-msft committed Jul 8, 2024
commit d39f50cf28643f6c1d8fae3c468416d05cf1919d
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -40,12 +40,15 @@ jobs:
run: ./build ci
if: ${{ runner.os != 'Windows' }}

- name: Test - YamlValidator
run: dotnet bin/Debug/YamlValidator.Tests/YamlValidator.Tests.dll
- name: Test - Persistence
run: dotnet bin/Debug/Persistence.Tests/Persistence.Tests.dll

- name: Test - PAModel
run: dotnet bin/Debug/PAModelTests/PAModelTests.dll

- name: Test - YamlValidator
run: dotnet bin/Debug/YamlValidator.Tests/YamlValidator.Tests.dll

- name: Test - Persistence.Tests Yaml Files (ubuntu & macos)
run: ./scripts/PersistenceValidate.sh
if: ${{ runner.os != 'Windows' }}
@@ -54,9 +57,6 @@ jobs:
run: ./scripts/PersistenceValidate.ps1
if: ${{ runner.os == 'Windows' }}

- name: Test - Persistence
run: dotnet bin/Debug/Persistence.Tests/Persistence.Tests.dll

- name: Restore workloads for samples
run: dotnet workload restore samples/MauiMsApp/MauiMsApp.csproj


Unchanged files with check annotations Beta

{
foreach (var control in controls)
{
childList.Add(_controlFactory.Create(control + childList.Count.ToString(), template: control,

Check warning on line 107 in samples/MSAppGenerator/ExampleGenerator.cs

GitHub Actions / build (windows-latest)

The behavior of 'int.ToString()' could vary based on the current user's locale settings. Replace this call in 'ExampleGenerator.GenerateApp(int, IList<string>)' with a call to 'int.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 107 in samples/MSAppGenerator/ExampleGenerator.cs

GitHub Actions / build (windows-latest)

The behavior of 'int.ToString()' could vary based on the current user's locale settings. Replace this call in 'ExampleGenerator.GenerateApp(int, IList<string>)' with a call to 'int.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 107 in samples/MSAppGenerator/ExampleGenerator.cs

GitHub Actions / build (windows-latest)

The behavior of 'int.ToString()' could vary based on the current user's locale settings. Replace this call in 'ExampleGenerator.GenerateApp(int, IList<string>)' with a call to 'int.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
properties: new()
));
}
namespace pptx2msapp;
internal class PptxConverter(IMsappArchiveFactory MsappArchiveFactory, IControlFactory ControlFactory) : IDisposable

Check warning on line 13 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

Type 'PptxConverter' can be sealed because it has no subtypes in its containing assembly and is not externally visible (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852)
{
private IMsappArchive? _msappArchive;
private bool _isDisposed;
if (run.RunProperties != null)
{
if (run.RunProperties.Bold != null)
text.Append($"font-weight: {(run.RunProperties.Bold.Value ? "bold" : "normal")}; ");

Check warning on line 128 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

The behavior of 'StringBuilder.Append(ref StringBuilder.AppendInterpolatedStringHandler)' could vary based on the current user's locale settings. Replace this call in 'PptxConverter.ConvertShape(string, TextBody, ShapeProperties, IList<Control>)' with a call to 'StringBuilder.Append(IFormatProvider, ref StringBuilder.AppendInterpolatedStringHandler)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 128 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

The behavior of 'StringBuilder.Append(ref StringBuilder.AppendInterpolatedStringHandler)' could vary based on the current user's locale settings. Replace this call in 'PptxConverter.ConvertShape(string, TextBody, ShapeProperties, IList<Control>)' with a call to 'StringBuilder.Append(IFormatProvider, ref StringBuilder.AppendInterpolatedStringHandler)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
if (run.RunProperties.FontSize != null)
text.Append($"font-size: {run.RunProperties.FontSize.Value / 100}pt; ");

Check warning on line 130 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

The behavior of 'StringBuilder.Append(ref StringBuilder.AppendInterpolatedStringHandler)' could vary based on the current user's locale settings. Replace this call in 'PptxConverter.ConvertShape(string, TextBody, ShapeProperties, IList<Control>)' with a call to 'StringBuilder.Append(IFormatProvider, ref StringBuilder.AppendInterpolatedStringHandler)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
}
text.Append($"'>");
}
);
_msappArchive!.App!.Screens.Last().Children.Add(image);

Check warning on line 177 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

Dereference of a possibly null reference.

Check warning on line 177 in samples/pptx2msapp/PptxConverter.cs

GitHub Actions / build (windows-latest)

Dereference of a possibly null reference.
}
#region Helpers
namespace pptx2msapp;
internal class Program

Check warning on line 9 in samples/pptx2msapp/Program.cs

GitHub Actions / build (windows-latest)

Type 'Program' can be sealed because it has no subtypes in its containing assembly and is not externally visible (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852)
{
public static IServiceProvider ServiceProvider { get; private set; }