From ad268306da26eeeb45cc5fc955889bdc23b853df Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 18:05:01 +0700 Subject: [PATCH 1/6] Added build-test-workflows.ps1 script to generate GitHub Actions workflow files based on project dependencies --- .github/workflows/build-test-workflows.ps1 | 310 +++++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 .github/workflows/build-test-workflows.ps1 diff --git a/.github/workflows/build-test-workflows.ps1 b/.github/workflows/build-test-workflows.ps1 new file mode 100644 index 0000000000..144143b95e --- /dev/null +++ b/.github/workflows/build-test-workflows.ps1 @@ -0,0 +1,310 @@ +# ----------------------------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the ""License""); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ----------------------------------------------------------------------------------- + +<# + .SYNOPSIS + Builds GitHub Actions workflows for running tests upon a pull request action (either a + new pull request or a push to an existing one). + + .DESCRIPTION + Generates 1 GitHub Actions workflow file for each project containing the string ".Tests" + in the name. The current project, ProjectReference dependencies, and common files + Directory.Build.*, TestTargetFraemworks.*, TestReferences.Common.* and Dependencies.props + are all used to build filter paths to determine when the workflow will run. + + .PARAMETER OutputDirectory + The directory to output the files. This should be in a directory named /.github/workflows + in the root of the repository. The default is the directory of this script file. + + .PARAMETER RepoRoot + The directory of the repository root. Defaults to two levels above the directory + of this script file. + + .PARAMETER TestFrameworks + A string array of Dotnet target framework monikers to run the tests on. The default is + @('net5.0','netcoreapp2.1','net48'). + + .PARAMETER OperatingSystems + A string array of Github Actions operating system monikers to run the tests on. + The default is @('windows-latest', 'ubuntu-latest'). + + .PARAMETER TestPlatforms + A string array of platforms to run the tests on. Valid values are x64 and x86. + The default is @('x64'). + + .PARAMETER Configurations + A string array of build configurations to run the tests on. The default is @('Release'). + + .PARAMETER DotNet5SDKVersion + The SDK version of .NET 5.x to install on the build agent to be used for building and + testing. This SDK is always installed on the build agent. The default is 5.0.100. + + .PARAMETER DotNetCore3SDKVersion + The SDK version of .NET Core 3.x to install on the build agent to be used for building and + testing. This SDK is only installed on the build agent when targeting .NET Core 3.x. + The default is 3.1.404. + + .PARAMETER DotNetCore2SDKVersion + The SDK version of .NET Core 2.x to install on the build agent to be used for building and + testing. This SDK is only installed on the build agent when targeting .NET Core 2.x. + The default is 2.1.811. +#> +param( + [string]$OutputDirectory = $PSScriptRoot, + + [string]$RepoRoot = (Split-Path (Split-Path $PSScriptRoot)), + + [string[]]$TestFrameworks = @('net5.0','netcoreapp2.1','net48'), + + [string[]]$OperatingSystems = @('windows-latest', 'ubuntu-latest'), + + [string[]]$TestPlatforms = @('x64'), + + [string[]]$Configurations = @('Release'), + + [string]$DotNet5SDKVersion = '5.0.100', + + [string]$DotNetCore3SDKVersion = '3.1.404', + + [string]$DotNetCore2SDKVersion = '2.1.811' +) + + +function Resolve-RelativePath([string]$RelativeRoot, [string]$Path) { + Push-Location -Path $RelativeRoot + try { + return Resolve-Path $Path -Relative + } finally { + Pop-Location + } +} + +function Get-ProjectDependencies([string]$ProjectPath, [string]$RelativeRoot, [System.Collections.Generic.HashSet[string]]$Result) { + $resolvedProjectPath = $ProjectPath + $rootPath = [System.IO.Path]::GetDirectoryName($resolvedProjectPath) + [xml]$project = Get-Content $resolvedProjectPath + foreach ($name in $project.SelectNodes("//Project/ItemGroup/ProjectReference") | ForEach-Object { $_.Include -split ';'}) { + $dependencyFullPath = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($rootPath, $name)) + Get-ProjectDependencies $dependencyFullPath $RelativeRoot $Result + $dependency = Resolve-RelativePath $RelativeRoot $dependencyFullPath + $result.Add($dependency) | Out-Null + } +} + +function Get-ProjectPathDirectories([string]$ProjectPath, [string]$RelativeRoot, [System.Collections.Generic.HashSet[string]]$Result) { + $currentPath = New-Object System.IO.DirectoryInfo([System.IO.Path]::GetDirectoryName($ProjectPath)) + $currentRelativePath = Resolve-RelativePath $RelativeRoot $currentPath.FullName + $Result.Add($currentRelativePath) | Out-Null + while ($true) { + $prevDirectory = New-Object System.IO.DirectoryInfo($currentPath.FullName) + $currentPath = $prevDirectory.Parent + if ($currentPath -eq $null) { + break + } + if ($currentPath.FullName -eq $RelativeRoot) { + $Result.Add(".") | Out-Null + break + } + $currentRelativePath = Resolve-RelativePath $RelativeRoot $currentPath.FullName + $Result.Add($currentRelativePath) | Out-Null + } +} + +function Ensure-Directory-Exists([string] $path) { + if (!(Test-Path $path)) { + New-Item $path -ItemType Directory + } +} + +function Write-TestWorkflow( + [string]$OutputDirectory = $PSScriptRoot, #optional + [string]$RelativeRoot, + [string]$ProjectPath, + [string[]]$Configurations = @('Release'), + [string[]]$TestFrameworks = @('net5.0', 'net48'), + [string[]]$TestPlatforms = @('x64'), + [string[]]$OperatingSystems = @('windows-latest', 'ubuntu-latest', 'macos-latest'), + [string]$DotNet5SDKVersion = $DotNet5SDKVersion, + [string]$DotNetCore3SDKVersion = $DotNetCore3SDKVersion, + [string]$DotNetCore2SDKVersion = $DotNetCore2SDKVersion) { + + $dependencies = New-Object System.Collections.Generic.HashSet[string] + Get-ProjectDependencies $ProjectPath $RelativeRoot $dependencies + $dependencyPaths = [System.Environment]::NewLine + foreach ($dependency in $dependencies) { + $dependencyRelativeDirectory = ([System.IO.Path]::GetDirectoryName($dependency) -replace '\\', '/').TrimStart('./') + $dependencyPaths += " - '$dependencyRelativeDirectory/**/*'" + [System.Environment]::NewLine + } + + $projectRelativePath = $(Resolve-RelativePath $RelativeRoot $ProjectPath) -replace '\\', '/' + $projectRelativeDirectory = ([System.IO.Path]::GetDirectoryName($projectRelativePath) -replace '\\', '/').TrimStart('./') + $projectName = [System.IO.Path]::GetFileNameWithoutExtension($ProjectPath) + + [string]$frameworks = '[' + $($TestFrameworks -join ', ') + ']' + [string]$platforms = '[' + $($TestPlatforms -join ', ') + ']' + [string]$oses = '[' + $($OperatingSystems -join ', ') + ']' + [string]$configurations = '[' + $($Configurations -join ', ') + ']' + + $directories = New-Object System.Collections.Generic.HashSet[string] + Get-ProjectPathDirectories $projectPath $RepoRoot $directories + + $directoryBuildPaths = [System.Environment]::NewLine + foreach ($directory in $directories) { + $relativeDirectory = ([System.IO.Path]::Combine($directory, 'Directory.Build.*') -replace '\\', '/').TrimStart('./') + $directoryBuildPaths += " - '$relativeDirectory'" + [System.Environment]::NewLine + } + + $fileText = "################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# `"License`"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# `"AS IS`" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: '$projectName' + +on: + workflow_dispatch: + pull_request: + paths: + - '$projectRelativeDirectory/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln'$directoryBuildPaths + # Dependencies$dependencyPaths +jobs: + + Test: + runs-on: `${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: $oses + framework: $frameworks + platform: $platforms + configuration: $configurations + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: '$projectRelativePath' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '$DotNetCore3SDKVersion' + if: `${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '$DotNetCore2SDKVersion' + if: `${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '$DotNet5SDKVersion' + + - run: | + `$project_name = [System.IO.Path]::GetFileNameWithoutExtension(`$env:project_path) + `$test_results_artifact_name = `"testresults_`${{matrix.os}}_`${{matrix.framework}}_`${{matrix.platform}}_`${{matrix.configuration}}`" + Write-Host `"Project Name: `$project_name`" + Write-Host `"Results Artifact Name: `$test_results_artifact_name`" + echo `"project_name=`$project_name`" | Out-File -FilePath `$env:GITHUB_ENV -Encoding utf8 -Append + echo `"test_results_artifact_name=`$test_results_artifact_name`" | Out-File -FilePath `$env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo `"title=Test Run for `$project_name - `${{matrix.framework}} - `${{matrix.platform}} - `${{matrix.os}}`" | Out-File -FilePath `$env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build `${{env.project_path}} --configuration `${{matrix.configuration}} --framework `${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test `${{env.project_path}} --configuration `${{matrix.configuration}} --framework `${{matrix.framework}} --no-build --no-restore --logger:`"console;verbosity=normal`" --logger:`"trx;LogFileName=`${{env.trx_file_name}}`" --logger:`"liquid.md;LogFileName=`${{env.md_file_name}};Title=`${{env.title}};`" --results-directory:`"`${{github.workspace}}/`${{env.test_results_artifact_name}}/`${{env.project_name}}`" -- RunConfiguration.TargetPlatform=`${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: `${{always()}} + with: + name: '`${{env.test_results_artifact_name}}' + path: '`${{github.workspace}}/`${{env.test_results_artifact_name}}' +" + + # GitHub Actions does not support filenames with "." in them, so replace + # with "-" + $projectFileName = $projectName -replace '\.', '-' + $FilePath = "$OutputDirectory/$projectFileName.yml" + + #$dir = [System.IO.Path]::GetDirectoryName($File) + Ensure-Directory-Exists $OutputDirectory + + Write-Host "Generating workflow file: $FilePath" + Out-File -filePath $FilePath -encoding UTF8 -inputObject $fileText + + #Write-Host $fileText +} + + +Push-Location $RelativeRoot +try { + [string[]]$TestProjects = Get-ChildItem -Path "$RepoRoot/**/*.csproj" -Recurse | where { $_.Directory.Name.Contains(".Tests") -and !($_.Directory.FullName.Contains('svn-')) } | Select-Object -ExpandProperty FullName +} finally { + Pop-Location +} + + +#Write-TestWorkflow -OutputDirectory $OutputDirectory -ProjectPath $projectPath -RelativeRoot $repoRoot -TestFrameworks @('net5.0','netcoreapp3.1') -TestPlatforms $TestPlatforms + +#Write-Host $TestProjects + +foreach ($testProject in $TestProjects) { + $projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject) + [string[]]$frameworks = $TestFrameworks + + # Special case - our CLI tool only supports .NET Core 3.1 + if ($projectName.Contains("Tests.Cli")) { + $frameworks = @('netcoreapp3.1') + } + + # Special case - OpenNLP.NET only supports .NET Framework + if ($projectName.Contains("Tests.Analysis.OpenNLP")) { + $frameworks = @('net48') + } + + #Write-Host "Project: $projectName" + Write-TestWorkflow -OutputDirectory $OutputDirectory -ProjectPath $testProject -RelativeRoot $RepoRoot -TestFrameworks $frameworks -OperatingSystems $OperatingSystems -TestPlatforms $TestPlatforms -Configurations $Configurations -DotNet5SDKVersion $DotNet5SDKVersion -DotNetCore3SDKVersion $DotNetCore3SDKVersion -DotNetCore2SDKVersion $DotNetCore2SDKVersion +} \ No newline at end of file From 8919f133e67c54102a6c149f4343f222cc1cf9db Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 22:40:36 +0700 Subject: [PATCH 2/6] Added the AwaitsFixAttribute to the known failing tests described in #363 and #269 --- .../Analysis/Th/TestThaiAnalyzer.cs | 4 +++- src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs | 4 +++- src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs | 1 + src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs | 5 ++++- src/Lucene.Net.Tests/Index/TestIndexWriter.cs | 2 ++ src/Lucene.Net.Tests/Search/TestBooleanQuery.cs | 3 +++ src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs | 3 +++ src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs | 3 ++- 8 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs index 113bbc70e5..00bfc142d1 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs @@ -1,4 +1,4 @@ -#if FEATURE_BREAKITERATOR +#if FEATURE_BREAKITERATOR using J2N.Threading; using Lucene.Net.Analysis.Core; using Lucene.Net.Analysis.TokenAttributes; @@ -355,6 +355,7 @@ private static void AssertAnalyzer(Analyzer analyzer, string text) /// /// blast some random strings through the analyzer [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestRandomStrings() { CheckRandomData(Random, new ThaiAnalyzer(TEST_VERSION_CURRENT), 1000 * RandomMultiplier); @@ -364,6 +365,7 @@ public virtual void TestRandomStrings() /// blast some random large strings through the analyzer /// [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestRandomHugeStrings() { Random random = Random; diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs index 903d31548c..2ec8ec81bc 100644 --- a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs +++ b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs @@ -86,8 +86,10 @@ public override void TearDown() base.TearDown(); } - // LUCENENET TODO: Fails on x86, Release, net45 (but doesn't fail if any of these 3 parameters are changed) [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestQueries() { int n = AtLeast(4); diff --git a/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs b/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs index b3061ad7ca..d6a5a74fd7 100644 --- a/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs +++ b/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs @@ -92,6 +92,7 @@ private void ReopenReader() [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public void TestBasic() { IReplicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1", server.CreateHandler()); diff --git a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs index 44a3e612a3..a0b3d85996 100644 --- a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs +++ b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs @@ -1,4 +1,4 @@ -using Lucene.Net.Documents; +using Lucene.Net.Documents; using Lucene.Net.Index; using Lucene.Net.Search; using Lucene.Net.Store; @@ -338,6 +338,9 @@ public void TestFuzzinessLong() * is not implemented correctly, there will be problems! */ [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public void TestTieBreaker() { Directory directory = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs index 25ff8369b9..7e9ed60fdf 100644 --- a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs +++ b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs @@ -1439,6 +1439,7 @@ public override void Run() [Test] [Slow] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestThreadInterruptDeadlock() { IndexerThreadInterrupt t = new IndexerThreadInterrupt(this); @@ -1479,6 +1480,7 @@ public virtual void TestThreadInterruptDeadlock() /// testThreadInterruptDeadlock but with 2 indexer threads [Test] [Slow] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestTwoThreadsInterruptDeadlock() { IndexerThreadInterrupt t1 = new IndexerThreadInterrupt(this); diff --git a/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs b/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs index 13440327c3..c1868f0ae7 100644 --- a/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs +++ b/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs @@ -214,6 +214,9 @@ public virtual void TestDeMorgan() } [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestBS2DisjunctionNextVsAdvance() { Directory d = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs b/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs index 8b0ddda816..c9601f1534 100644 --- a/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs +++ b/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs @@ -248,6 +248,9 @@ public virtual void Test2() /// is not implemented correctly, there will be problems! /// [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestTieBreaker() { Directory directory = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs b/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs index de579b5cb1..27d58d2cb7 100644 --- a/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs +++ b/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs @@ -1,4 +1,4 @@ -using Lucene.Net.Attributes; +using Lucene.Net.Attributes; using Lucene.Net.Documents; using Lucene.Net.Index.Extensions; using Lucene.Net.Store; @@ -79,6 +79,7 @@ public override void Eval(MockDirectoryWrapper dir) } [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public void TestSubclassTaskMergeScheduler() { MockDirectoryWrapper dir = NewMockDirectory(); From b1fb805f73e4cfaf8d0b870027c2b0ac07e471dd Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 22:46:58 +0700 Subject: [PATCH 3/6] azure-pipelines.yml: Changed default of AwaitsFix to true during CI builds. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4cad1452f3..9c03826e24 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -148,7 +148,7 @@ stages: $nightly = if ($Env:IsNightly -eq 'true') { 'true' } else { 'false' } $weekly = if ($Env:IsWeekly -eq 'true') { 'true' } else { 'false' } $slow = if ($Env:RunSlowTests -ne 'false') { 'true' } else { 'false' } - $awaitsFix = if ($Env:RunAwaitsFixTests -eq 'true') { 'true' } else { 'false' } + $awaitsFix = if ($Env:RunAwaitsFixTests -ne 'false') { 'true' } else { 'false' } $codec = if ($Env:Codec -eq $null) { 'random' } else { $Env:Codec } $docValuesFormat = if ($Env:DocValuesFormat -eq $null) { 'random' } else { $Env:DocValuesFormat } $postingsFormat = if ($Env:PostingsFormat -eq $null) { 'random' } else { $Env:PostingsFormat } From 93443f3cfaa92f22ed817c2c53b0eacb7edf878d Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 23:09:21 +0700 Subject: [PATCH 4/6] Added LiquidTestReports.Markdown to all test projects --- NuGet.config | 1 + build/Dependencies.props | 1 + build/TestReferences.Common.targets | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/NuGet.config b/NuGet.config index afae52770a..5e4e97f5b7 100644 --- a/NuGet.config +++ b/NuGet.config @@ -21,6 +21,7 @@ under the License. + diff --git a/build/Dependencies.props b/build/Dependencies.props index 623c5feb25..a2550b7a36 100644 --- a/build/Dependencies.props +++ b/build/Dependencies.props @@ -39,6 +39,7 @@ $(ICU4NPackageVersion) $(ICU4NPackageVersion) 2.0.0-beta-0010 + 1.0.2-beta 1.0.3 1.0.3 2.9.8 diff --git a/build/TestReferences.Common.targets b/build/TestReferences.Common.targets index 4a6e513b16..85971056f8 100644 --- a/build/TestReferences.Common.targets +++ b/build/TestReferences.Common.targets @@ -19,7 +19,12 @@ --> + + true + + + From 26f2294e7887ad831827032a9c96d5ff6cd1f758 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 23:12:38 +0700 Subject: [PATCH 5/6] Generated workflow files for each test project to run on GitHub Actions during pull requests --- .../Lucene-Net-Tests-Analysis-Common.yml | 102 +++++++++++++++ .../Lucene-Net-Tests-Analysis-Kuromoji.yml | 103 +++++++++++++++ .../Lucene-Net-Tests-Analysis-Morfologik.yml | 103 +++++++++++++++ .../Lucene-Net-Tests-Analysis-OpenNLP.yml | 107 ++++++++++++++++ .../Lucene-Net-Tests-Analysis-Phonetic.yml | 103 +++++++++++++++ .../Lucene-Net-Tests-Analysis-SmartCn.yml | 107 ++++++++++++++++ .../Lucene-Net-Tests-Analysis-Stempel.yml | 103 +++++++++++++++ .../workflows/Lucene-Net-Tests-Benchmark.yml | 113 ++++++++++++++++ .../Lucene-Net-Tests-Classification.yml | 104 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Cli.yml | 121 ++++++++++++++++++ .../Lucene-Net-Tests-CodeAnalysis.yml | 102 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Codecs.yml | 102 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Demo.yml | 110 ++++++++++++++++ .../Lucene-Net-Tests-Expressions.yml | 104 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Facet.yml | 106 +++++++++++++++ .../workflows/Lucene-Net-Tests-Grouping.yml | 104 +++++++++++++++ .../Lucene-Net-Tests-Highlighter.yml | 105 +++++++++++++++ .github/workflows/Lucene-Net-Tests-ICU.yml | 108 ++++++++++++++++ .github/workflows/Lucene-Net-Tests-Join.yml | 105 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Memory.yml | 106 +++++++++++++++ .github/workflows/Lucene-Net-Tests-Misc.yml | 103 +++++++++++++++ .../workflows/Lucene-Net-Tests-Queries.yml | 103 +++++++++++++++ .../Lucene-Net-Tests-QueryParser.yml | 105 +++++++++++++++ .../workflows/Lucene-Net-Tests-Replicator.yml | 108 ++++++++++++++++ .../workflows/Lucene-Net-Tests-Sandbox.yml | 103 +++++++++++++++ .../workflows/Lucene-Net-Tests-Spatial.yml | 104 +++++++++++++++ .../workflows/Lucene-Net-Tests-Suggest.yml | 105 +++++++++++++++ ...ests-TestFramework-DependencyInjection.yml | 102 +++++++++++++++ .../Lucene-Net-Tests-TestFramework.yml | 102 +++++++++++++++ .github/workflows/Lucene-Net-Tests-_A-D.yml | 108 ++++++++++++++++ .github/workflows/Lucene-Net-Tests-_E-I.yml | 108 ++++++++++++++++ .github/workflows/Lucene-Net-Tests-_I-J.yml | 108 ++++++++++++++++ .github/workflows/Lucene-Net-Tests-_J-S.yml | 108 ++++++++++++++++ .github/workflows/Lucene-Net-Tests-_T-Z.yml | 108 ++++++++++++++++ 34 files changed, 3593 insertions(+) create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-Common.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-Kuromoji.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-Morfologik.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-Phonetic.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-SmartCn.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Analysis-Stempel.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Benchmark.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Classification.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Cli.yml create mode 100644 .github/workflows/Lucene-Net-Tests-CodeAnalysis.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Codecs.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Demo.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Expressions.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Facet.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Grouping.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Highlighter.yml create mode 100644 .github/workflows/Lucene-Net-Tests-ICU.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Join.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Memory.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Misc.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Queries.yml create mode 100644 .github/workflows/Lucene-Net-Tests-QueryParser.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Replicator.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Sandbox.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Spatial.yml create mode 100644 .github/workflows/Lucene-Net-Tests-Suggest.yml create mode 100644 .github/workflows/Lucene-Net-Tests-TestFramework-DependencyInjection.yml create mode 100644 .github/workflows/Lucene-Net-Tests-TestFramework.yml create mode 100644 .github/workflows/Lucene-Net-Tests-_A-D.yml create mode 100644 .github/workflows/Lucene-Net-Tests-_E-I.yml create mode 100644 .github/workflows/Lucene-Net-Tests-_I-J.yml create mode 100644 .github/workflows/Lucene-Net-Tests-_J-S.yml create mode 100644 .github/workflows/Lucene-Net-Tests-_T-Z.yml diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-Common.yml b/.github/workflows/Lucene-Net-Tests-Analysis-Common.yml new file mode 100644 index 0000000000..931628ea88 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-Common.yml @@ -0,0 +1,102 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.Common' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.Common/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.Common/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-Kuromoji.yml b/.github/workflows/Lucene-Net-Tests-Analysis-Kuromoji.yml new file mode 100644 index 0000000000..8ce1de274f --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-Kuromoji.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.Kuromoji' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.Kuromoji/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.Kuromoji/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Analysis.Kuromoji/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-Morfologik.yml b/.github/workflows/Lucene-Net-Tests-Analysis-Morfologik.yml new file mode 100644 index 0000000000..d608493b6d --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-Morfologik.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.Morfologik' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.Morfologik/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.Morfologik/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Analysis.Morfologik/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.Morfologik/Lucene.Net.Tests.Analysis.Morfologik.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml b/.github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml new file mode 100644 index 0000000000..26fc9db3bd --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml @@ -0,0 +1,107 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.OpenNLP' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.OpenNLP/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.OpenNLP/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/dotnet/Lucene.Net.ICU/**/*' + - 'src/Lucene.Net.Analysis.OpenNLP/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.OpenNLP/Lucene.Net.Tests.Analysis.OpenNLP.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-Phonetic.yml b/.github/workflows/Lucene-Net-Tests-Analysis-Phonetic.yml new file mode 100644 index 0000000000..6192e360db --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-Phonetic.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.Phonetic' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.Phonetic/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.Phonetic/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Analysis.Phonetic/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-SmartCn.yml b/.github/workflows/Lucene-Net-Tests-Analysis-SmartCn.yml new file mode 100644 index 0000000000..dcba0e46b4 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-SmartCn.yml @@ -0,0 +1,107 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.SmartCn' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.SmartCn/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.SmartCn/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/dotnet/Lucene.Net.ICU/**/*' + - 'src/Lucene.Net.Analysis.SmartCn/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Analysis-Stempel.yml b/.github/workflows/Lucene-Net-Tests-Analysis-Stempel.yml new file mode 100644 index 0000000000..834b2fe2f3 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Analysis-Stempel.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Analysis.Stempel' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Analysis.Stempel/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Analysis.Stempel/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Analysis.Stempel/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Benchmark.yml b/.github/workflows/Lucene-Net-Tests-Benchmark.yml new file mode 100644 index 0000000000..c2417150a6 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Benchmark.yml @@ -0,0 +1,113 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Benchmark' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Benchmark/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Benchmark/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/dotnet/Lucene.Net.ICU/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.Spatial/**/*' + - 'src/Lucene.Net.Benchmark/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Classification.yml b/.github/workflows/Lucene-Net-Tests-Classification.yml new file mode 100644 index 0000000000..355ceab3e7 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Classification.yml @@ -0,0 +1,104 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Classification' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Classification/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Classification/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Classification/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Cli.yml b/.github/workflows/Lucene-Net-Tests-Cli.yml new file mode 100644 index 0000000000..02f61529b7 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Cli.yml @@ -0,0 +1,121 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Cli' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/dotnet/tools/Lucene.Net.Tests.Cli/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/dotnet/tools/Lucene.Net.Tests.Cli/Directory.Build.*' + - 'src/dotnet/tools/Directory.Build.*' + - 'src/dotnet/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Analysis.Kuromoji/**/*' + - 'src/Lucene.Net.Analysis.Stempel/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/dotnet/Lucene.Net.ICU/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.Spatial/**/*' + - 'src/Lucene.Net.Benchmark/**/*' + - 'src/Lucene.Net.Expressions/**/*' + - 'src/Lucene.Net.Demo/**/*' + - 'src/Lucene.Net.Misc/**/*' + - 'src/dotnet/tools/lucene-cli/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [netcoreapp3.1] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-CodeAnalysis.yml b/.github/workflows/Lucene-Net-Tests-CodeAnalysis.yml new file mode 100644 index 0000000000..808e8b53e3 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-CodeAnalysis.yml @@ -0,0 +1,102 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.CodeAnalysis' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/dotnet/Lucene.Net.Tests.CodeAnalysis/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/dotnet/Lucene.Net.Tests.CodeAnalysis/Directory.Build.*' + - 'src/dotnet/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/dotnet/Lucene.Net.CodeAnalysis.CSharp/**/*' + - 'src/dotnet/Lucene.Net.CodeAnalysis.VisualBasic/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/dotnet/Lucene.Net.Tests.CodeAnalysis/Lucene.Net.Tests.CodeAnalysis.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Codecs.yml b/.github/workflows/Lucene-Net-Tests-Codecs.yml new file mode 100644 index 0000000000..6afad8cff4 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Codecs.yml @@ -0,0 +1,102 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Codecs' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Codecs/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Codecs/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Demo.yml b/.github/workflows/Lucene-Net-Tests-Demo.yml new file mode 100644 index 0000000000..35e01d04b8 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Demo.yml @@ -0,0 +1,110 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Demo' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Demo/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Demo/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Expressions/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.Demo/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Expressions.yml b/.github/workflows/Lucene-Net-Tests-Expressions.yml new file mode 100644 index 0000000000..994fb553de --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Expressions.yml @@ -0,0 +1,104 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Expressions' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Expressions/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Expressions/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Expressions/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Facet.yml b/.github/workflows/Lucene-Net-Tests-Facet.yml new file mode 100644 index 0000000000..e4a26c46c2 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Facet.yml @@ -0,0 +1,106 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Facet' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Facet/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Facet/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Grouping.yml b/.github/workflows/Lucene-Net-Tests-Grouping.yml new file mode 100644 index 0000000000..f9575ce2e9 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Grouping.yml @@ -0,0 +1,104 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Grouping' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Grouping/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Grouping/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Highlighter.yml b/.github/workflows/Lucene-Net-Tests-Highlighter.yml new file mode 100644 index 0000000000..f2cbaaa6d9 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Highlighter.yml @@ -0,0 +1,105 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Highlighter' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Highlighter/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Highlighter/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-ICU.yml b/.github/workflows/Lucene-Net-Tests-ICU.yml new file mode 100644 index 0000000000..3b1312458c --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-ICU.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.ICU' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/dotnet/Lucene.Net.Tests.ICU/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/dotnet/Lucene.Net.Tests.ICU/Directory.Build.*' + - 'src/dotnet/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Highlighter/**/*' + - 'src/dotnet/Lucene.Net.ICU/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + - 'src/Lucene.Net.Tests.Analysis.Common/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Join.yml b/.github/workflows/Lucene-Net-Tests-Join.yml new file mode 100644 index 0000000000..5d72a5e901 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Join.yml @@ -0,0 +1,105 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Join' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Join/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Join/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Memory.yml b/.github/workflows/Lucene-Net-Tests-Memory.yml new file mode 100644 index 0000000000..4d5a863b72 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Memory.yml @@ -0,0 +1,106 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Memory' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Memory/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Memory/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Memory/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Misc.yml b/.github/workflows/Lucene-Net-Tests-Misc.yml new file mode 100644 index 0000000000..268997681b --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Misc.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Misc' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Misc/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Misc/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Misc/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Queries.yml b/.github/workflows/Lucene-Net-Tests-Queries.yml new file mode 100644 index 0000000000..0762f520d4 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Queries.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Queries' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Queries/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Queries/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-QueryParser.yml b/.github/workflows/Lucene-Net-Tests-QueryParser.yml new file mode 100644 index 0000000000..67630f4555 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-QueryParser.yml @@ -0,0 +1,105 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.QueryParser' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.QueryParser/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.QueryParser/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Replicator.yml b/.github/workflows/Lucene-Net-Tests-Replicator.yml new file mode 100644 index 0000000000..514d105430 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Replicator.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Replicator' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Replicator/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Replicator/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Replicator/**/*' + - 'src/dotnet/Lucene.Net.Replicator.AspNetCore/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Sandbox.yml b/.github/workflows/Lucene-Net-Tests-Sandbox.yml new file mode 100644 index 0000000000..4faf7f6e64 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Sandbox.yml @@ -0,0 +1,103 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Sandbox' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Sandbox/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Sandbox/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Spatial.yml b/.github/workflows/Lucene-Net-Tests-Spatial.yml new file mode 100644 index 0000000000..58685cefa6 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Spatial.yml @@ -0,0 +1,104 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Spatial' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Spatial/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Spatial/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Spatial/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-Suggest.yml b/.github/workflows/Lucene-Net-Tests-Suggest.yml new file mode 100644 index 0000000000..11bf9a5b85 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-Suggest.yml @@ -0,0 +1,105 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.Suggest' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.Suggest/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.Suggest/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Misc/**/*' + - 'src/Lucene.Net.Suggest/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-TestFramework-DependencyInjection.yml b/.github/workflows/Lucene-Net-Tests-TestFramework-DependencyInjection.yml new file mode 100644 index 0000000000..c243a4830f --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-TestFramework-DependencyInjection.yml @@ -0,0 +1,102 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.TestFramework.DependencyInjection' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.TestFramework.DependencyInjection/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.TestFramework.DependencyInjection/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.TestFramework.DependencyInjection/Lucene.Net.Tests.TestFramework.DependencyInjection.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-TestFramework.yml b/.github/workflows/Lucene-Net-Tests-TestFramework.yml new file mode 100644 index 0000000000..a6d5c7bc66 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-TestFramework.yml @@ -0,0 +1,102 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests.TestFramework' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests.TestFramework/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests.TestFramework/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests.TestFramework/Lucene.Net.Tests.TestFramework.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-_A-D.yml b/.github/workflows/Lucene-Net-Tests-_A-D.yml new file mode 100644 index 0000000000..ab561822e2 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-_A-D.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests._A-D' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests._A-D/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests._A-D/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests._A-D/Lucene.Net.Tests._A-D.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-_E-I.yml b/.github/workflows/Lucene-Net-Tests-_E-I.yml new file mode 100644 index 0000000000..af21b1e0a6 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-_E-I.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests._E-I' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests._E-I/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests._E-I/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-_I-J.yml b/.github/workflows/Lucene-Net-Tests-_I-J.yml new file mode 100644 index 0000000000..bfd2ce206c --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-_I-J.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests._I-J' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests._I-J/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests._I-J/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests._I-J/Lucene.Net.Tests._I-J.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-_J-S.yml b/.github/workflows/Lucene-Net-Tests-_J-S.yml new file mode 100644 index 0000000000..3b4cf1ffab --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-_J-S.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests._J-S' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests._J-S/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests._J-S/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + diff --git a/.github/workflows/Lucene-Net-Tests-_T-Z.yml b/.github/workflows/Lucene-Net-Tests-_T-Z.yml new file mode 100644 index 0000000000..6371e52b85 --- /dev/null +++ b/.github/workflows/Lucene-Net-Tests-_T-Z.yml @@ -0,0 +1,108 @@ +################################################################################### +# DO NOT EDIT: This file was automatically generated by build-test-workflows.ps1 +################################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: 'Lucene.Net.Tests._T-Z' + +on: + workflow_dispatch: + pull_request: + paths: + - 'src/Lucene.Net.Tests._T-Z/**/*' + - 'build/Dependencies.props' + - 'build/TestReferences.Common.*' + - 'TestTargetFrameworks.*' + - '*.sln' + - 'src/Lucene.Net.Tests._T-Z/Directory.Build.*' + - 'src/Directory.Build.*' + - 'Directory.Build.*' + + # Dependencies + - 'src/Lucene.Net/**/*' + - 'src/Lucene.Net.Codecs/**/*' + - 'src/Lucene.Net.Queries/**/*' + - 'src/Lucene.Net.Grouping/**/*' + - 'src/Lucene.Net.Join/**/*' + - 'src/Lucene.Net.Facet/**/*' + - 'src/Lucene.Net.Analysis.Common/**/*' + - 'src/Lucene.Net.Sandbox/**/*' + - 'src/Lucene.Net.QueryParser/**/*' + - 'src/Lucene.Net.TestFramework/**/*' + +jobs: + + Test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + framework: [net5.0, netcoreapp2.1, net48] + platform: [x64] + configuration: [Release] + exclude: + - os: ubuntu-latest + framework: net48 + - os: macos-latest + framework: net48 + env: + project_path: './src/Lucene.Net.Tests._T-Z/Lucene.Net.Tests._T-Z.csproj' + trx_file_name: 'TestResults.trx' + md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.404' + if: ${{ startswith(matrix.framework, 'netcoreapp3.') }} + + - name: Setup .NET 2.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.811' + if: ${{ startswith(matrix.framework, 'netcoreapp2.') }} + + - name: Setup .NET 5 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.100' + + - run: | + $project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path) + $test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}" + Write-Host "Project Name: $project_name" + Write-Host "Results Artifact Name: $test_results_artifact_name" + echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Title for LiquidTestReports.Markdown + echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh + - run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true + - run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} + # upload reports as build artifacts + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + if: ${{always()}} + with: + name: '${{env.test_results_artifact_name}}' + path: '${{github.workspace}}/${{env.test_results_artifact_name}}' + From c52a6e685d2043c5389116255d1e1b3f8c43eae4 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Sat, 21 Nov 2020 00:46:22 +0700 Subject: [PATCH 6/6] Update SearchFiles.cs --- src/Lucene.Net.Demo/SearchFiles.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lucene.Net.Demo/SearchFiles.cs b/src/Lucene.Net.Demo/SearchFiles.cs index fb933fbdd5..2df975aa37 100644 --- a/src/Lucene.Net.Demo/SearchFiles.cs +++ b/src/Lucene.Net.Demo/SearchFiles.cs @@ -306,4 +306,4 @@ public static void DoPagingSearch(IndexSearcher searcher, Query query, } } } -} +}// Something