Skip to content

Commit

Permalink
update paths to build files
Browse files Browse the repository at this point in the history
  • Loading branch information
atomczak committed Aug 19, 2024
1 parent 8cbbb75 commit 1b6fc51
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/check-test-cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- master
- development
- 1.0.x
- 1.1.x
- 2.0.x
pull_request:
branches: [ "*" ] # Run the workflow for all pull requests

Expand All @@ -17,5 +20,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run './build.cmd AuditAllIdsFiles'
run: ./build.cmd AuditAllIdsFiles
- name: Run './RepositoryAutomation/build.cmd AuditAllIdsFiles'
run: ./RepositoryAutomation/build.cmd AuditAllIdsFiles
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
2021 Detailed Project Plan/2021 IDS detailed project plan.docx
build/bin/
build/obj/
/RepositoryAutomation/build/bin
/RepositoryAutomation/build/obj/
.vscode/
.tmp/
/build/.vs/
/RepositoryAutomation/build/.vs/
/.nuke/temp/
/.vs/
/SchemaProject/.vs/
/SchemaProject/bin/
/SchemaProject/obj/
/SchemaProject/Ids.cs
/RepositoryAutomation/SchemaProject/.vs/
/RepositoryAutomation/SchemaProject/bin/
/RepositoryAutomation/SchemaProject/obj/
/RepositoryAutomation/SchemaProject/Ids.cs
.DS_Store

28 changes: 14 additions & 14 deletions RepositoryAutomation/build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Build : NukeBuild
[PackageExecutable("dotnet-xscgen", "tools/net6.0/any/xscgen.dll")]
private Tool SchemaTool;

static Nuke.Common.IO.AbsolutePath SchemaProjectFolder { get; } = RootDirectory / "SchemaProject";
static Nuke.Common.IO.AbsolutePath SchemaProjectFolder { get; } = RootDirectory / "RepositoryAutomation" / "SchemaProject";
static Nuke.Common.IO.AbsolutePath SchemaProjectFileName { get; } = SchemaProjectFolder / "SchemaProject.csproj";

/// <summary>
Expand All @@ -35,7 +35,7 @@ class Build : NukeBuild
// ======= Preparing IDS Schema

// development samples
var schemaFile = RootDirectory / "Development" / "ids.xsd";
var schemaFile = RootDirectory / "Schema" / "ids.xsd";
var schemaContent = File.ReadAllText(schemaFile);

// min/max cardinality hack
Expand Down Expand Up @@ -155,53 +155,53 @@ class Build : NukeBuild
/// The tool is deployed by the annotated <see cref="IdsTool"/>.
/// The schema is loaded from the repository to ensure internal coherence.
/// </summary>
Target AuditDevelopment => _ => _
Target AuditExamples => _ => _
.AssuredAfterFailure()
.Executes(() =>
{
// development samples
var schemaFile = RootDirectory / "Development" / "ids.xsd";
var inputFolder = RootDirectory / "Development";
var schemaFile = RootDirectory / "Schema" / "ids.xsd";
var inputFolder = RootDirectory / "Documentation" / "Examples";
var arguments = $"audit \"{inputFolder}\" -x \"{schemaFile}\"";
IdsTool(arguments, workingDirectory: IdsToolPath);
});

/// <summary>
/// Audits the validity of Documentation/testcases folder in the repository, using ids-tool.
/// Audits the validity of Documentation/ImplementersDocumentation/TestCases folder in the repository, using ids-tool.
/// The tool is deployed by the annotated <see cref="IdsTool"/>.
/// The schema is loaded from the repository to ensure internal coherence.
/// </summary>
Target AuditDocTestCases => _ => _
.AssuredAfterFailure()
.Executes(() =>
{
// we are omitting tests on the content of the Documentation/testcases folder,
// we are omitting tests on the content of the Documentation/ImplementersDocumentation/TestCases folder,
// because they include IDSs that intentionally contain errors
//
// todo: once stable, this could be improved to omit contents based on failure patter name
// todo: once stable, constrained on expected auditing failures on the "fail-" cases should be added
var schemaFile = RootDirectory / "Development" / "ids.xsd";
var inputFolder = RootDirectory / "Documentation" / "testcases";
var schemaFile = RootDirectory / "Schema" / "ids.xsd";
var inputFolder = RootDirectory / "Documentation" / "ImplementersDocumentation" / "TestCases";
var arguments = $"audit \"{inputFolder}\" --omitContentAuditPattern \"[\\\\|/]invalid-\" -x \"{schemaFile}\"";
IdsTool(arguments, workingDirectory: IdsToolPath);
});

/// <summary>
/// Audits the validity of Documentation/testcases folder in the repository, using ids-tool.
/// Audits the validity of Documentation/ImplementersDocumentation/TestCases folder in the repository, using ids-tool.
/// The tool is deployed by the annotated <see cref="IdsTool"/>.
/// The schema is loaded from the repository to ensure internal coherence.
/// </summary>
Target TestAccurateInvalid => _ => _
.AssuredAfterFailure()
.Executes(() =>
{
// we are omitting tests on the content of the Documentation/testcases folder,
// we are omitting tests on the content of the Documentation/ImplementersDocumentation/TestCases folder,
// because they include IDSs that intentionally contain errors
//
// todo: once stable, this could be improved to omit contents based on failure patter name
// todo: once stable, constrained on expected auditing failures on the "fail-" cases should be added
var schemaFile = RootDirectory / "Development" / "ids.xsd";
var inputFolder = RootDirectory / "Documentation" / "testcases";
var schemaFile = RootDirectory / "Schema" / "ids.xsd";
var inputFolder = RootDirectory / "Documentation" / "ImplementersDocumentation" / "TestCases";

DirectoryInfo d = new DirectoryInfo(inputFolder);
foreach (var invalidFile in d.GetFiles("invalid-*.ids", SearchOption.AllDirectories))
Expand Down Expand Up @@ -229,7 +229,7 @@ class Build : NukeBuild
Target AuditAllIdsFiles => _ => _
.AssuredAfterFailure()
.DependsOn(AuditDocTestCases)
.DependsOn(AuditDevelopment)
.DependsOn(AuditExamples)
.DependsOn(TestAccurateInvalid)
.Executes(() =>
{
Expand Down

0 comments on commit 1b6fc51

Please sign in to comment.