diff --git a/.appveyor.yml b/.appveyor.yml index 3c69a2b2..00b75590 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -23,7 +23,7 @@ build_script: # Tests test_script: - - ps: cd .\tests\script-runner\net8.0\ + - ps: cd .\tests\script-runner\net8.0-git-cli\ - ps: .\build.ps1 --verbosity=diagnostic #---------------------------------# diff --git a/.azuredevops/pipelines/templates/jobs/test-frosting.yml b/.azuredevops/pipelines/templates/jobs/test-frosting.yml index b11cd333..809b9178 100644 --- a/.azuredevops/pipelines/templates/jobs/test-frosting.yml +++ b/.azuredevops/pipelines/templates/jobs/test-frosting.yml @@ -1,23 +1,28 @@ parameters: -- name: vmImage - type: string -- name: dotNetVersion - type: string + - name: images + type: object + - name: dotNetVersions + type: object + - name: repositoryInfoProviders + type: object jobs: -- job: Test_Frosting_${{ replace(replace(parameters.vmImage,'-','_'),'.','_') }}_Net${{ parameters.dotNetVersion }} - displayName: Integration Tests Frosting ${{ parameters.vmImage }} (.NET ${{ parameters.dotNetVersion }}) - dependsOn: Build - pool: - vmImage: '${{ parameters.vmImage }}' - steps: - - template: ../steps/prepare-test.yml - parameters: - dotNetVersion: ${{ parameters.dotNetVersion }} - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/frosting/net${{ parameters.dotNetVersion }}.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net${{ parameters.dotNetVersion }}.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting ${{ parameters.vmImage }} (.NET ${{ parameters.dotNetVersion }}) - displayName: 'Publish generated reports as build artifact' + - ${{ each image in parameters.images }}: + - ${{ each dotnetVersion in parameters.dotNetVersions }}: + - ${{ each repositoryInfoProvider in parameters.repositoryInfoProviders }}: + - job: Test_Frosting_${{ replace(replace(image,'-','_'),'.','_') }}_Net${{ dotNetVersion }}_${{ replace(repositoryInfoProvider,'-','_') }} + displayName: Integration Tests Frosting ${{ image }} (.NET ${{ dotNetVersion }} / ${{ repositoryInfoProvider }}) + dependsOn: Build + pool: + vmImage: '${{ image }}' + steps: + - template: ../steps/prepare-test.yml + parameters: + dotNetVersion: ${{ dotNetVersion }} + - bash: | + ./build.sh --verbosity=diagnostic + workingDirectory: ./tests/frosting/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }} + displayName: 'Run integration tests' + - publish: $(Build.SourcesDirectory)/tests/frosting/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }}/build/BuildArtifacts/output + artifact: Integration Tests Frosting ${{ image }} (.NET ${{ dotNetVersion }} + ${{ repositoryInfoProvider }}) + displayName: 'Publish generated reports as build artifact' diff --git a/.azuredevops/pipelines/templates/jobs/test-scripting.yml b/.azuredevops/pipelines/templates/jobs/test-scripting.yml index 3a2ac55a..2bde7e13 100644 --- a/.azuredevops/pipelines/templates/jobs/test-scripting.yml +++ b/.azuredevops/pipelines/templates/jobs/test-scripting.yml @@ -1,23 +1,28 @@ parameters: -- name: vmImage - type: string -- name: dotNetVersion - type: string + - name: images + type: object + - name: dotNetVersions + type: object + - name: repositoryInfoProviders + type: object jobs: -- job: Test_Script_Runner_${{ replace(replace(parameters.vmImage,'-','_'),'.','_') }}_Net${{ parameters.dotNetVersion }} - displayName: Integration Tests Script Runner ${{ parameters.vmImage }} (.NET ${{ parameters.dotNetVersion }}) - dependsOn: Build - pool: - vmImage: '${{ parameters.vmImage }}' - steps: - - template: ../steps/prepare-test.yml - parameters: - dotNetVersion: ${{ parameters.dotNetVersion }} - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/script-runner/net${{ parameters.dotNetVersion }}.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/net${{ parameters.dotNetVersion }}.0/BuildArtifacts/output - artifact: Integration Tests Script Runner ${{ parameters.vmImage }} (.NET ${{ parameters.dotNetVersion }}) - displayName: 'Publish generated reports as build artifact' + - ${{ each image in parameters.images }}: + - ${{ each dotnetVersion in parameters.dotNetVersions }}: + - ${{ each repositoryInfoProvider in parameters.repositoryInfoProviders }}: + - job: Test_Script_Runner_${{ replace(replace(image,'-','_'),'.','_') }}_Net${{ dotNetVersion }}_${{ replace(repositoryInfoProvider,'-','_') }} + displayName: Integration Tests Script Runner ${{ image }} (.NET ${{ dotNetVersion }} / ${{ repositoryInfoProvider }}) + dependsOn: Build + pool: + vmImage: '${{ image }}' + steps: + - template: ../steps/prepare-test.yml + parameters: + dotNetVersion: ${{ dotNetVersion }} + - bash: | + ./build.sh --verbosity=diagnostic + workingDirectory: ./tests/script-runner/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }} + displayName: 'Run integration tests' + - publish: $(Build.SourcesDirectory)/tests/script-runner/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }}/BuildArtifacts/output + artifact: Integration Tests Script Runner ${{ image }} (.NET ${{ dotNetVersion }} + ${{ repositoryInfoProvider }}) + displayName: 'Publish generated reports as build artifact' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de70bd84..f6761c53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: 8.x - name: Run integration tests run: ./build.ps1 --verbosity=diagnostic - working-directory: ./tests/script-runner/net8.0/ + working-directory: ./tests/script-runner/net8.0-git-cli/ shell: powershell - name: Publish generated reports as build artifact uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b05984b0..f53b0d1a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,63 +33,15 @@ jobs: - publish: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet artifact: NuGet Package displayName: 'Publish NuGet package as build artifact' -# Integration Tests Frosting Windows 2019 (.NET 8) +# Integration Tests Frosting - template: .azuredevops/pipelines/templates/jobs/test-frosting.yml parameters: - vmImage: 'windows-2019' - dotNetVersion: 8 -# Integration Tests Frosting Windows 2019 (.NET 9) -- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml - parameters: - vmImage: 'windows-2022' - dotNetVersion: 9 -# Integration Tests Script Runner Windows 2019 (.NET 8) -- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml - parameters: - vmImage: 'windows-2019' - dotNetVersion: 8 -# Integration Tests Script Runner Windows 2022 (.NET 9) -- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml - parameters: - vmImage: 'windows-2022' - dotNetVersion: 9 -# Integration Tests Frosting macOS 13 (.NET 8) -- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml - parameters: - vmImage: 'macOS-13' - dotNetVersion: 8 -# Integration Tests Frosting macOS 14 (.NET 9) -- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml - parameters: - vmImage: 'macOS-14' - dotNetVersion: 9 -# Integration Tests Script Runner macOS 13 (.NET 8) -- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml - parameters: - vmImage: 'macOS-13' - dotNetVersion: 8 -# Integration Tests Script Runner macOS 14 (.NET 9) -- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml - parameters: - vmImage: 'macOS-14' - dotNetVersion: 9 -# Integration Tests Frosting Ubuntu 22.04 (.NET 8) -- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml - parameters: - vmImage: 'ubuntu-22.04' - dotNetVersion: 8 -# Integration Tests Frosting Ubuntu 24.04 (.NET 9) -- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml - parameters: - vmImage: 'ubuntu-24.04' - dotNetVersion: 9 -# Integration Tests Script Runner Ubuntu 22.04 (.NET tool) -- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml - parameters: - vmImage: 'ubuntu-22.04' - dotNetVersion: 8 -# Integration Tests Script Runner Ubuntu 24.04 (.NET tool) + images: [ 'windows-2019', 'windows-2022', 'macOS-13', 'macOS-14', 'ubuntu-22.04', 'ubuntu-24.04' ] + dotNetVersions: [ 8, 9 ] + repositoryInfoProviders: [ 'git-cli', 'cake-git' ] +# Integration Tests Script Runner - template: .azuredevops/pipelines/templates/jobs/test-scripting.yml parameters: - vmImage: 'ubuntu-24.04' - dotNetVersion: 9 + images: [ 'windows-2019', 'windows-2022', 'macOS-13', 'macOS-14', 'ubuntu-22.04', 'ubuntu-24.04' ] + dotNetVersions: [ 8, 9 ] + repositoryInfoProviders: [ 'git-cli', 'cake-git' ] \ No newline at end of file diff --git a/tests/frosting/net8.0/build.ps1 b/tests/frosting/net8.0-cake-git/build.ps1 similarity index 100% rename from tests/frosting/net8.0/build.ps1 rename to tests/frosting/net8.0-cake-git/build.ps1 diff --git a/tests/frosting/net8.0/build.sh b/tests/frosting/net8.0-cake-git/build.sh similarity index 100% rename from tests/frosting/net8.0/build.sh rename to tests/frosting/net8.0-cake-git/build.sh diff --git a/tests/frosting/net8.0/build/.gitignore b/tests/frosting/net8.0-cake-git/build/.gitignore similarity index 100% rename from tests/frosting/net8.0/build/.gitignore rename to tests/frosting/net8.0-cake-git/build/.gitignore diff --git a/tests/frosting/net8.0/build/Build.csproj b/tests/frosting/net8.0-cake-git/build/Build.csproj similarity index 100% rename from tests/frosting/net8.0/build/Build.csproj rename to tests/frosting/net8.0-cake-git/build/Build.csproj diff --git a/tests/frosting/net8.0-cake-git/build/Program.cs b/tests/frosting/net8.0-cake-git/build/Program.cs new file mode 100644 index 00000000..221b4caf --- /dev/null +++ b/tests/frosting/net8.0-cake-git/build/Program.cs @@ -0,0 +1,124 @@ +using System; +using System.Reflection; +using Cake.Common; +using Cake.Common.Diagnostics; +using Cake.Common.Tools.InspectCode; +using Cake.Core; +using Cake.Core.Diagnostics; +using Cake.Core.IO; +using Cake.Frosting; + +public static class Program +{ + public static int Main(string[] args) + { + return new CakeHost() + .UseContext() + .UseLifetime() + .InstallTool(new Uri("nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.3.4")) + // Register Cake.Frosting.Issues.Recipe tasks. + .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask))) + .Run(args); + } +} + +public class BuildContext : IssuesContext +{ + public BuildContext(ICakeContext context) + : base(context) + { + } + + protected override BuildParameters CreateIssuesParameters() + { + return new BuildParameters(); + } + + protected override BuildState CreateIssuesState() + { + return new BuildState(this); + } +} + +public class BuildParameters : IssuesParameters +{ + public DirectoryPath LogDirectoryPath => this.OutputDirectory.Combine("logs"); + + public BuildParameters() + { + this.OutputDirectory = this.OutputDirectory.Combine("output"); + } +} + +public class BuildState : IssuesState +{ + public FilePath SolutionFilePath { get; } + + public BuildState(BuildContext context) + : base(context, RepositoryInfoProviderType.CakeGit) + { + this.SolutionFilePath = + this.ProjectRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + } +} + +public class Lifetime : FrostingLifetime +{ + public override void Setup(BuildContext context, ISetupContext info) + { + // Determine Build Identifier + var platform = context.Environment.Platform.Family.ToString(); + var runtime = context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + context.Parameters.BuildIdentifier = $"Cake Frosting {platform} ({runtime})"; + + context.Information("Build identifier: {0}", context.Parameters.BuildIdentifier); + } + + public override void Teardown(BuildContext context, ITeardownContext info) + { + } +} + +[TaskName("Run-InspectCode")] +public sealed class RunInspectCodeTask : FrostingTask +{ + public override bool ShouldRun(BuildContext context) + { + return context.IsRunningOnWindows(); + } + + public override void Run(BuildContext context) + { + // Run InspectCode. + var inspectCodeLogFilePath = context.Parameters.LogDirectoryPath.CombineWithFilePath("inspectCode.log"); + + var settings = new InspectCodeSettings() { + OutputFile = inspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build"), + WorkingDirectory = context.State.ProjectRootDirectory + }; + + context.InspectCode( + context.State.SolutionFilePath, + settings); + + // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); + } +} + +[TaskName("Lint")] +[IsDependentOn(typeof(RunInspectCodeTask))] +[IsDependeeOf(typeof(ReadIssuesTask))] +public class LintTask : FrostingTask +{ +} + +[TaskName("Default")] +[IsDependentOn(typeof(IssuesTask))] +public class DefaultTask : FrostingTask +{ +} diff --git a/tests/frosting/net8.0/global.json b/tests/frosting/net8.0-cake-git/global.json similarity index 100% rename from tests/frosting/net8.0/global.json rename to tests/frosting/net8.0-cake-git/global.json diff --git a/tests/frosting/net8.0/nuget.config b/tests/frosting/net8.0-cake-git/nuget.config similarity index 100% rename from tests/frosting/net8.0/nuget.config rename to tests/frosting/net8.0-cake-git/nuget.config diff --git a/tests/frosting/net8.0/src/ClassLibrary1.sln b/tests/frosting/net8.0-cake-git/src/ClassLibrary1.sln similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1.sln rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1.sln diff --git a/tests/frosting/net8.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net8.0-cake-git/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1/Class1.cs diff --git a/tests/frosting/net8.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0/build.ps1 b/tests/frosting/net8.0-git-cli/build.ps1 similarity index 100% rename from tests/frosting/net9.0/build.ps1 rename to tests/frosting/net8.0-git-cli/build.ps1 diff --git a/tests/frosting/net9.0/build.sh b/tests/frosting/net8.0-git-cli/build.sh similarity index 100% rename from tests/frosting/net9.0/build.sh rename to tests/frosting/net8.0-git-cli/build.sh diff --git a/tests/frosting/net9.0/build/.gitignore b/tests/frosting/net8.0-git-cli/build/.gitignore similarity index 100% rename from tests/frosting/net9.0/build/.gitignore rename to tests/frosting/net8.0-git-cli/build/.gitignore diff --git a/tests/frosting/net8.0-git-cli/build/Build.csproj b/tests/frosting/net8.0-git-cli/build/Build.csproj new file mode 100644 index 00000000..2edeb45f --- /dev/null +++ b/tests/frosting/net8.0-git-cli/build/Build.csproj @@ -0,0 +1,12 @@ + + + Exe + net8.0 + $(MSBuildProjectDirectory) + enable + + + + + + \ No newline at end of file diff --git a/tests/frosting/net8.0/build/Program.cs b/tests/frosting/net8.0-git-cli/build/Program.cs similarity index 100% rename from tests/frosting/net8.0/build/Program.cs rename to tests/frosting/net8.0-git-cli/build/Program.cs diff --git a/tests/script-runner/net8.0/global.json b/tests/frosting/net8.0-git-cli/global.json similarity index 100% rename from tests/script-runner/net8.0/global.json rename to tests/frosting/net8.0-git-cli/global.json diff --git a/tests/frosting/net9.0/nuget.config b/tests/frosting/net8.0-git-cli/nuget.config similarity index 100% rename from tests/frosting/net9.0/nuget.config rename to tests/frosting/net8.0-git-cli/nuget.config diff --git a/tests/frosting/net9.0/src/ClassLibrary1.sln b/tests/frosting/net8.0-git-cli/src/ClassLibrary1.sln similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1.sln rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1.sln diff --git a/tests/frosting/net9.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net8.0-git-cli/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1/Class1.cs diff --git a/tests/frosting/net9.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0-cake-git/build.ps1 b/tests/frosting/net9.0-cake-git/build.ps1 new file mode 100644 index 00000000..eace4c8f --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build.ps1 @@ -0,0 +1,13 @@ +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if (Test-Path $RECIPE_PACKAGE_PATH) +{ + Write-Host "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + Remove-Item $RECIPE_PACKAGE_PATH -Recurse; +} +else +{ + Write-Host "$RECIPE_PACKAGE_PATH not cached..." +} + +dotnet run --project build/Build.csproj -- $args +exit $LASTEXITCODE; \ No newline at end of file diff --git a/tests/frosting/net9.0-cake-git/build.sh b/tests/frosting/net9.0-cake-git/build.sh new file mode 100755 index 00000000..8dafc54e --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build.sh @@ -0,0 +1,11 @@ + +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if [ -d "$RECIPE_PACKAGE_PATH" ] +then + echo "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + rm -Rf $RECIPE_PACKAGE_PATH +else + echo "$RECIPE_PACKAGE_PATH not cached..." +fi + +dotnet run --project ./build/Build.csproj -- "$@" diff --git a/tests/frosting/net9.0-cake-git/build/.gitignore b/tests/frosting/net9.0-cake-git/build/.gitignore new file mode 100644 index 00000000..29cb0b57 --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build/.gitignore @@ -0,0 +1,2 @@ +### Cake ### +tools/* \ No newline at end of file diff --git a/tests/frosting/net9.0/build/Build.csproj b/tests/frosting/net9.0-cake-git/build/Build.csproj similarity index 100% rename from tests/frosting/net9.0/build/Build.csproj rename to tests/frosting/net9.0-cake-git/build/Build.csproj diff --git a/tests/frosting/net9.0-cake-git/build/Program.cs b/tests/frosting/net9.0-cake-git/build/Program.cs new file mode 100644 index 00000000..221b4caf --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build/Program.cs @@ -0,0 +1,124 @@ +using System; +using System.Reflection; +using Cake.Common; +using Cake.Common.Diagnostics; +using Cake.Common.Tools.InspectCode; +using Cake.Core; +using Cake.Core.Diagnostics; +using Cake.Core.IO; +using Cake.Frosting; + +public static class Program +{ + public static int Main(string[] args) + { + return new CakeHost() + .UseContext() + .UseLifetime() + .InstallTool(new Uri("nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.3.4")) + // Register Cake.Frosting.Issues.Recipe tasks. + .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask))) + .Run(args); + } +} + +public class BuildContext : IssuesContext +{ + public BuildContext(ICakeContext context) + : base(context) + { + } + + protected override BuildParameters CreateIssuesParameters() + { + return new BuildParameters(); + } + + protected override BuildState CreateIssuesState() + { + return new BuildState(this); + } +} + +public class BuildParameters : IssuesParameters +{ + public DirectoryPath LogDirectoryPath => this.OutputDirectory.Combine("logs"); + + public BuildParameters() + { + this.OutputDirectory = this.OutputDirectory.Combine("output"); + } +} + +public class BuildState : IssuesState +{ + public FilePath SolutionFilePath { get; } + + public BuildState(BuildContext context) + : base(context, RepositoryInfoProviderType.CakeGit) + { + this.SolutionFilePath = + this.ProjectRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + } +} + +public class Lifetime : FrostingLifetime +{ + public override void Setup(BuildContext context, ISetupContext info) + { + // Determine Build Identifier + var platform = context.Environment.Platform.Family.ToString(); + var runtime = context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + context.Parameters.BuildIdentifier = $"Cake Frosting {platform} ({runtime})"; + + context.Information("Build identifier: {0}", context.Parameters.BuildIdentifier); + } + + public override void Teardown(BuildContext context, ITeardownContext info) + { + } +} + +[TaskName("Run-InspectCode")] +public sealed class RunInspectCodeTask : FrostingTask +{ + public override bool ShouldRun(BuildContext context) + { + return context.IsRunningOnWindows(); + } + + public override void Run(BuildContext context) + { + // Run InspectCode. + var inspectCodeLogFilePath = context.Parameters.LogDirectoryPath.CombineWithFilePath("inspectCode.log"); + + var settings = new InspectCodeSettings() { + OutputFile = inspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build"), + WorkingDirectory = context.State.ProjectRootDirectory + }; + + context.InspectCode( + context.State.SolutionFilePath, + settings); + + // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); + } +} + +[TaskName("Lint")] +[IsDependentOn(typeof(RunInspectCodeTask))] +[IsDependeeOf(typeof(ReadIssuesTask))] +public class LintTask : FrostingTask +{ +} + +[TaskName("Default")] +[IsDependentOn(typeof(IssuesTask))] +public class DefaultTask : FrostingTask +{ +} diff --git a/tests/frosting/net9.0/global.json b/tests/frosting/net9.0-cake-git/global.json similarity index 100% rename from tests/frosting/net9.0/global.json rename to tests/frosting/net9.0-cake-git/global.json diff --git a/tests/frosting/net9.0-cake-git/nuget.config b/tests/frosting/net9.0-cake-git/nuget.config new file mode 100644 index 00000000..663b555f --- /dev/null +++ b/tests/frosting/net9.0-cake-git/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net8.0/src/ClassLibrary1.sln b/tests/frosting/net9.0-cake-git/src/ClassLibrary1.sln similarity index 100% rename from tests/script-runner/net8.0/src/ClassLibrary1.sln rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1.sln diff --git a/tests/script-runner/net8.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net9.0-cake-git/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/script-runner/net8.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1/Class1.cs diff --git a/tests/script-runner/net8.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/script-runner/net8.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0-git-cli/build.ps1 b/tests/frosting/net9.0-git-cli/build.ps1 new file mode 100644 index 00000000..eace4c8f --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build.ps1 @@ -0,0 +1,13 @@ +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if (Test-Path $RECIPE_PACKAGE_PATH) +{ + Write-Host "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + Remove-Item $RECIPE_PACKAGE_PATH -Recurse; +} +else +{ + Write-Host "$RECIPE_PACKAGE_PATH not cached..." +} + +dotnet run --project build/Build.csproj -- $args +exit $LASTEXITCODE; \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/build.sh b/tests/frosting/net9.0-git-cli/build.sh new file mode 100755 index 00000000..8dafc54e --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build.sh @@ -0,0 +1,11 @@ + +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if [ -d "$RECIPE_PACKAGE_PATH" ] +then + echo "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + rm -Rf $RECIPE_PACKAGE_PATH +else + echo "$RECIPE_PACKAGE_PATH not cached..." +fi + +dotnet run --project ./build/Build.csproj -- "$@" diff --git a/tests/frosting/net9.0-git-cli/build/.gitignore b/tests/frosting/net9.0-git-cli/build/.gitignore new file mode 100644 index 00000000..29cb0b57 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build/.gitignore @@ -0,0 +1,2 @@ +### Cake ### +tools/* \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/build/Build.csproj b/tests/frosting/net9.0-git-cli/build/Build.csproj new file mode 100644 index 00000000..112c7ff6 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build/Build.csproj @@ -0,0 +1,12 @@ + + + Exe + net9.0 + $(MSBuildProjectDirectory) + enable + + + + + + \ No newline at end of file diff --git a/tests/frosting/net9.0/build/Program.cs b/tests/frosting/net9.0-git-cli/build/Program.cs similarity index 100% rename from tests/frosting/net9.0/build/Program.cs rename to tests/frosting/net9.0-git-cli/build/Program.cs diff --git a/tests/script-runner/net9.0/global.json b/tests/frosting/net9.0-git-cli/global.json similarity index 100% rename from tests/script-runner/net9.0/global.json rename to tests/frosting/net9.0-git-cli/global.json diff --git a/tests/frosting/net9.0-git-cli/nuget.config b/tests/frosting/net9.0-git-cli/nuget.config new file mode 100644 index 00000000..663b555f --- /dev/null +++ b/tests/frosting/net9.0-git-cli/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0/src/ClassLibrary1.sln b/tests/frosting/net9.0-git-cli/src/ClassLibrary1.sln similarity index 100% rename from tests/script-runner/net9.0/src/ClassLibrary1.sln rename to tests/frosting/net9.0-git-cli/src/ClassLibrary1.sln diff --git a/tests/script-runner/net9.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net9.0-git-cli/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/script-runner/net9.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net9.0-git-cli/src/ClassLibrary1/Class1.cs diff --git a/tests/script-runner/net9.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/script-runner/net9.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/script-runner/net8.0/.config/dotnet-tools.json b/tests/script-runner/net8.0-cake-git/.config/dotnet-tools.json similarity index 100% rename from tests/script-runner/net8.0/.config/dotnet-tools.json rename to tests/script-runner/net8.0-cake-git/.config/dotnet-tools.json diff --git a/tests/script-runner/net8.0/.gitignore b/tests/script-runner/net8.0-cake-git/.gitignore similarity index 100% rename from tests/script-runner/net8.0/.gitignore rename to tests/script-runner/net8.0-cake-git/.gitignore diff --git a/tests/script-runner/net8.0-cake-git/build.cake b/tests/script-runner/net8.0-cake-git/build.cake new file mode 100644 index 00000000..94d08cfa --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/build.cake @@ -0,0 +1,133 @@ +#load nuget:?package=Cake.Issues.Recipe&prerelease +#load "buildData.cake" + +#addin "Cake.Markdownlint" + +#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.1.2 +#tool nuget:?package=MSBuild.Extension.Pack&version=1.9.1 + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +RepositoryInfoProvider = Argument("repositoryInfoProvider", RepositoryInfoProviderType.CakeGit); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(setupContext); +}); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Configure-IssuesManagement") + .Does((data) => +{ + var platform = Context.Environment.Platform.Family.ToString(); + var runtime = Context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + IssuesParameters.BuildIdentifier = $"{platform} ({runtime})"; + + Information("Build identifier: {0}", IssuesParameters.BuildIdentifier); +}); + +Task("Build") + .Does((data) => +{ + var solutionFile = + data.IssuesData.BuildRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + +#if NETCOREAPP + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + data.MsBuildLogFilePath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); +#else + NuGetRestore(solutionFile); + + var settings = + new MSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, + "BinaryLogger", + data.MsBuildLogFilePath.FullPath); + MSBuild(solutionFile, settings); +#endif + + // Pass path to MsBuild log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); +}); + +Task("Run-InspectCode") + .WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.") + .Does((data) => +{ + var settings = new InspectCodeSettings() { + OutputFile = data.InspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build") + }; + + InspectCode( + data.IssuesData.BuildRootDirectory.Combine("src").CombineWithFilePath("ClassLibrary1.sln"), + settings); + + // Pass path to InspectCode log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); +}); + +Task("Lint-Documentation") + .Does((data) => +{ + var settings = + MarkdownlintNodeJsRunnerSettings.ForDirectory( + data.IssuesData.BuildRootDirectory.Combine("docs")); + settings.OutputFile = data.MarkdownlintCliLogFilePath; + settings.ThrowOnIssue = false; + RunMarkdownlintNodeJs(settings); + + // Pass path to markdownlint-cli log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); +}); + +Task("Lint") + .IsDependentOn("Run-InspectCode") + .IsDependentOn("Lint-Documentation"); + +// Make sure build and linters run before issues task. +IssuesBuildTasks.ReadIssuesTask + .IsDependentOn("Build") + .IsDependentOn("Lint"); + +// Run issues task by default. +Task("Default") + .IsDependentOn("Configure-IssuesManagement") + .IsDependentOn("Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/script-runner/net8.0/build.ps1 b/tests/script-runner/net8.0-cake-git/build.ps1 similarity index 100% rename from tests/script-runner/net8.0/build.ps1 rename to tests/script-runner/net8.0-cake-git/build.ps1 diff --git a/tests/script-runner/net8.0/build.sh b/tests/script-runner/net8.0-cake-git/build.sh similarity index 100% rename from tests/script-runner/net8.0/build.sh rename to tests/script-runner/net8.0-cake-git/build.sh diff --git a/tests/script-runner/net8.0/buildData.cake b/tests/script-runner/net8.0-cake-git/buildData.cake similarity index 100% rename from tests/script-runner/net8.0/buildData.cake rename to tests/script-runner/net8.0-cake-git/buildData.cake diff --git a/tests/script-runner/net8.0/docs/index.md b/tests/script-runner/net8.0-cake-git/docs/index.md similarity index 100% rename from tests/script-runner/net8.0/docs/index.md rename to tests/script-runner/net8.0-cake-git/docs/index.md diff --git a/tests/script-runner/net8.0-cake-git/global.json b/tests/script-runner/net8.0-cake-git/global.json new file mode 100644 index 00000000..db28d4c7 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.404", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net8.0/nuget.config b/tests/script-runner/net8.0-cake-git/nuget.config similarity index 100% rename from tests/script-runner/net8.0/nuget.config rename to tests/script-runner/net8.0-cake-git/nuget.config diff --git a/tests/script-runner/net8.0-cake-git/src/ClassLibrary1.sln b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{9B73BB5B-06A3-46F3-9068-E3607A8217B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/Class1.cs b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/Class1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassLibrary1 +{ + public class Class1 + { + public void Foo() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + + public void Bar() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + } +} diff --git a/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0/.config/dotnet-tools.json b/tests/script-runner/net8.0-git-cli/.config/dotnet-tools.json similarity index 100% rename from tests/script-runner/net9.0/.config/dotnet-tools.json rename to tests/script-runner/net8.0-git-cli/.config/dotnet-tools.json diff --git a/tests/script-runner/net9.0/.gitignore b/tests/script-runner/net8.0-git-cli/.gitignore similarity index 100% rename from tests/script-runner/net9.0/.gitignore rename to tests/script-runner/net8.0-git-cli/.gitignore diff --git a/tests/script-runner/net8.0/build.cake b/tests/script-runner/net8.0-git-cli/build.cake similarity index 100% rename from tests/script-runner/net8.0/build.cake rename to tests/script-runner/net8.0-git-cli/build.cake diff --git a/tests/script-runner/net9.0/build.ps1 b/tests/script-runner/net8.0-git-cli/build.ps1 similarity index 100% rename from tests/script-runner/net9.0/build.ps1 rename to tests/script-runner/net8.0-git-cli/build.ps1 diff --git a/tests/script-runner/net9.0/build.sh b/tests/script-runner/net8.0-git-cli/build.sh similarity index 100% rename from tests/script-runner/net9.0/build.sh rename to tests/script-runner/net8.0-git-cli/build.sh diff --git a/tests/script-runner/net9.0/buildData.cake b/tests/script-runner/net8.0-git-cli/buildData.cake similarity index 100% rename from tests/script-runner/net9.0/buildData.cake rename to tests/script-runner/net8.0-git-cli/buildData.cake diff --git a/tests/script-runner/net9.0/docs/index.md b/tests/script-runner/net8.0-git-cli/docs/index.md similarity index 100% rename from tests/script-runner/net9.0/docs/index.md rename to tests/script-runner/net8.0-git-cli/docs/index.md diff --git a/tests/script-runner/net8.0-git-cli/global.json b/tests/script-runner/net8.0-git-cli/global.json new file mode 100644 index 00000000..db28d4c7 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.404", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0/nuget.config b/tests/script-runner/net8.0-git-cli/nuget.config similarity index 100% rename from tests/script-runner/net9.0/nuget.config rename to tests/script-runner/net8.0-git-cli/nuget.config diff --git a/tests/script-runner/net8.0-git-cli/src/ClassLibrary1.sln b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{9B73BB5B-06A3-46F3-9068-E3607A8217B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/Class1.cs b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/Class1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassLibrary1 +{ + public class Class1 + { + public void Foo() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + + public void Bar() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + } +} diff --git a/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json b/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json new file mode 100644 index 00000000..43e6f74c --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/.gitignore b/tests/script-runner/net9.0-cake-git/.gitignore new file mode 100644 index 00000000..e7c49629 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/.gitignore @@ -0,0 +1,379 @@ + +# Created by https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + +### Cake ### +tools/* +!tools/packages.config + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + + +# Project specific folders +BuildArtifacts diff --git a/tests/script-runner/net9.0-cake-git/build.cake b/tests/script-runner/net9.0-cake-git/build.cake new file mode 100644 index 00000000..94d08cfa --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/build.cake @@ -0,0 +1,133 @@ +#load nuget:?package=Cake.Issues.Recipe&prerelease +#load "buildData.cake" + +#addin "Cake.Markdownlint" + +#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.1.2 +#tool nuget:?package=MSBuild.Extension.Pack&version=1.9.1 + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +RepositoryInfoProvider = Argument("repositoryInfoProvider", RepositoryInfoProviderType.CakeGit); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(setupContext); +}); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Configure-IssuesManagement") + .Does((data) => +{ + var platform = Context.Environment.Platform.Family.ToString(); + var runtime = Context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + IssuesParameters.BuildIdentifier = $"{platform} ({runtime})"; + + Information("Build identifier: {0}", IssuesParameters.BuildIdentifier); +}); + +Task("Build") + .Does((data) => +{ + var solutionFile = + data.IssuesData.BuildRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + +#if NETCOREAPP + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + data.MsBuildLogFilePath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); +#else + NuGetRestore(solutionFile); + + var settings = + new MSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, + "BinaryLogger", + data.MsBuildLogFilePath.FullPath); + MSBuild(solutionFile, settings); +#endif + + // Pass path to MsBuild log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); +}); + +Task("Run-InspectCode") + .WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.") + .Does((data) => +{ + var settings = new InspectCodeSettings() { + OutputFile = data.InspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build") + }; + + InspectCode( + data.IssuesData.BuildRootDirectory.Combine("src").CombineWithFilePath("ClassLibrary1.sln"), + settings); + + // Pass path to InspectCode log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); +}); + +Task("Lint-Documentation") + .Does((data) => +{ + var settings = + MarkdownlintNodeJsRunnerSettings.ForDirectory( + data.IssuesData.BuildRootDirectory.Combine("docs")); + settings.OutputFile = data.MarkdownlintCliLogFilePath; + settings.ThrowOnIssue = false; + RunMarkdownlintNodeJs(settings); + + // Pass path to markdownlint-cli log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); +}); + +Task("Lint") + .IsDependentOn("Run-InspectCode") + .IsDependentOn("Lint-Documentation"); + +// Make sure build and linters run before issues task. +IssuesBuildTasks.ReadIssuesTask + .IsDependentOn("Build") + .IsDependentOn("Lint"); + +// Run issues task by default. +Task("Default") + .IsDependentOn("Configure-IssuesManagement") + .IsDependentOn("Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/build.ps1 b/tests/script-runner/net9.0-cake-git/build.ps1 new file mode 100644 index 00000000..fe602768 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/build.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' + +$SCRIPT_NAME = "build.cake" + +Write-Host "Restoring .NET Core tools" +dotnet tool restore +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Running Build" +dotnet cake $SCRIPT_NAME @args +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/build.sh b/tests/script-runner/net9.0-cake-git/build.sh new file mode 100755 index 00000000..921a3241 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +SCRIPT_NAME="build.cake" + +echo "Restoring .NET Core tools" +dotnet tool restore + +echo "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap + +echo "Running Build" +dotnet cake $SCRIPT_NAME "$@" \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/buildData.cake b/tests/script-runner/net9.0-cake-git/buildData.cake new file mode 100644 index 00000000..ca5e49ad --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/buildData.cake @@ -0,0 +1,28 @@ +public class BuildData +{ + public IssuesData IssuesData { get; } + + public FilePath MsBuildLogFilePath { get; } + + public FilePath InspectCodeLogFilePath { get; } + + public FilePath MarkdownlintCliLogFilePath { get; } + + public BuildData(ICakeContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + this.IssuesData = context.Data.Get(); + + var buildArtifactsDirectory = new DirectoryPath("BuildArtifacts"); + IssuesParameters.OutputDirectory = buildArtifactsDirectory.Combine("output"); + + var logDirectory = buildArtifactsDirectory.Combine("logs"); + this.MsBuildLogFilePath = logDirectory.CombineWithFilePath("msbuild.binlog"); + this.InspectCodeLogFilePath = logDirectory.CombineWithFilePath("inspectCode.log"); + this.MarkdownlintCliLogFilePath = logDirectory.CombineWithFilePath("markdownlintCli.log"); + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/docs/index.md b/tests/script-runner/net9.0-cake-git/docs/index.md new file mode 100644 index 00000000..68eae708 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/docs/index.md @@ -0,0 +1,7 @@ +# foo +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum dictum mauris, sed feugiat nibh rutrum eget. Fusce sed purus nec sem faucibus semper sed id est. Cras vestibulum leo nec ipsum posuere eleifend. Nullam iaculis quam in sapien efficitur consequat. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus pulvinar bibendum sapien ac ultrices. Sed imperdiet mi non felis imperdiet, at interdum ante volutpat. Pellentesque eu cursus dolor, non iaculis ipsum. Quisque in tortor viverra, sodales nibh vitae, vehicula urna. Integer dolor mauris, condimentum ac accumsan quis, placerat eget tellus. Duis volutpat interdum nisi, vel efficitur nisl viverra vitae. Maecenas eget lacus vel lacus congue lobortis. Etiam ornare dictum nulla nec commodo. + +# bar +``` +Praesent euismod est vel quam volutpat ultrices. Cras luctus lorem quis nibh tincidunt, a auctor velit fermentum. Cras et nisl neque. Sed mi lorem, efficitur et purus eu, vehicula ornare felis. Aliquam sagittis ultricies sem, nec dignissim erat porta at. Suspendisse in justo lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ornare neque porttitor tortor auctor lobortis posuere id dui. Phasellus et felis a nibh viverra cursus ut blandit ante. Suspendisse lacus tortor, pharetra non pulvinar vulputate, semper sed augue. Aenean feugiat finibus quam quis iaculis. Maecenas ac quam quis risus scelerisque rhoncus. Donec eget aliquam metus. Nam feugiat sem dui, quis consectetur lorem lobortis in. Maecenas eu bibendum sapien. +``` \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/global.json b/tests/script-runner/net9.0-cake-git/global.json new file mode 100644 index 00000000..913686c4 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "9.0.101", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/nuget.config b/tests/script-runner/net9.0-cake-git/nuget.config new file mode 100644 index 00000000..62768c3d --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/src/ClassLibrary1.sln b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{9B73BB5B-06A3-46F3-9068-E3607A8217B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/Class1.cs b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/Class1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassLibrary1 +{ + public class Class1 + { + public void Foo() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + + public void Bar() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + } +} diff --git a/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json b/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json new file mode 100644 index 00000000..43e6f74c --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/.gitignore b/tests/script-runner/net9.0-git-cli/.gitignore new file mode 100644 index 00000000..e7c49629 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/.gitignore @@ -0,0 +1,379 @@ + +# Created by https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + +### Cake ### +tools/* +!tools/packages.config + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + + +# Project specific folders +BuildArtifacts diff --git a/tests/script-runner/net9.0/build.cake b/tests/script-runner/net9.0-git-cli/build.cake similarity index 100% rename from tests/script-runner/net9.0/build.cake rename to tests/script-runner/net9.0-git-cli/build.cake diff --git a/tests/script-runner/net9.0-git-cli/build.ps1 b/tests/script-runner/net9.0-git-cli/build.ps1 new file mode 100644 index 00000000..fe602768 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/build.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' + +$SCRIPT_NAME = "build.cake" + +Write-Host "Restoring .NET Core tools" +dotnet tool restore +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Running Build" +dotnet cake $SCRIPT_NAME @args +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/build.sh b/tests/script-runner/net9.0-git-cli/build.sh new file mode 100755 index 00000000..921a3241 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +SCRIPT_NAME="build.cake" + +echo "Restoring .NET Core tools" +dotnet tool restore + +echo "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap + +echo "Running Build" +dotnet cake $SCRIPT_NAME "$@" \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/buildData.cake b/tests/script-runner/net9.0-git-cli/buildData.cake new file mode 100644 index 00000000..ca5e49ad --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/buildData.cake @@ -0,0 +1,28 @@ +public class BuildData +{ + public IssuesData IssuesData { get; } + + public FilePath MsBuildLogFilePath { get; } + + public FilePath InspectCodeLogFilePath { get; } + + public FilePath MarkdownlintCliLogFilePath { get; } + + public BuildData(ICakeContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + this.IssuesData = context.Data.Get(); + + var buildArtifactsDirectory = new DirectoryPath("BuildArtifacts"); + IssuesParameters.OutputDirectory = buildArtifactsDirectory.Combine("output"); + + var logDirectory = buildArtifactsDirectory.Combine("logs"); + this.MsBuildLogFilePath = logDirectory.CombineWithFilePath("msbuild.binlog"); + this.InspectCodeLogFilePath = logDirectory.CombineWithFilePath("inspectCode.log"); + this.MarkdownlintCliLogFilePath = logDirectory.CombineWithFilePath("markdownlintCli.log"); + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/docs/index.md b/tests/script-runner/net9.0-git-cli/docs/index.md new file mode 100644 index 00000000..68eae708 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/docs/index.md @@ -0,0 +1,7 @@ +# foo +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum dictum mauris, sed feugiat nibh rutrum eget. Fusce sed purus nec sem faucibus semper sed id est. Cras vestibulum leo nec ipsum posuere eleifend. Nullam iaculis quam in sapien efficitur consequat. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus pulvinar bibendum sapien ac ultrices. Sed imperdiet mi non felis imperdiet, at interdum ante volutpat. Pellentesque eu cursus dolor, non iaculis ipsum. Quisque in tortor viverra, sodales nibh vitae, vehicula urna. Integer dolor mauris, condimentum ac accumsan quis, placerat eget tellus. Duis volutpat interdum nisi, vel efficitur nisl viverra vitae. Maecenas eget lacus vel lacus congue lobortis. Etiam ornare dictum nulla nec commodo. + +# bar +``` +Praesent euismod est vel quam volutpat ultrices. Cras luctus lorem quis nibh tincidunt, a auctor velit fermentum. Cras et nisl neque. Sed mi lorem, efficitur et purus eu, vehicula ornare felis. Aliquam sagittis ultricies sem, nec dignissim erat porta at. Suspendisse in justo lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ornare neque porttitor tortor auctor lobortis posuere id dui. Phasellus et felis a nibh viverra cursus ut blandit ante. Suspendisse lacus tortor, pharetra non pulvinar vulputate, semper sed augue. Aenean feugiat finibus quam quis iaculis. Maecenas ac quam quis risus scelerisque rhoncus. Donec eget aliquam metus. Nam feugiat sem dui, quis consectetur lorem lobortis in. Maecenas eu bibendum sapien. +``` \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/global.json b/tests/script-runner/net9.0-git-cli/global.json new file mode 100644 index 00000000..913686c4 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "9.0.101", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/nuget.config b/tests/script-runner/net9.0-git-cli/nuget.config new file mode 100644 index 00000000..62768c3d --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/src/ClassLibrary1.sln b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{9B73BB5B-06A3-46F3-9068-E3607A8217B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/Class1.cs b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/Class1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassLibrary1 +{ + public class Class1 + { + public void Foo() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + + public void Bar() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + } +} diff --git a/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file