Skip to content

Commit

Permalink
azure-pipelines.yml: Added tests for .NET Framework x86 (see #258)
Browse files Browse the repository at this point in the history
  • Loading branch information
NightOwl888 committed Sep 23, 2020
1 parent de5251c commit b8ab1eb
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 19 deletions.
29 changes: 24 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,15 @@ stages:
imageName: 'macOS-10.14'
maximumParallelJobs: 7
maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
displayName: 'Test netcoreapp3.1 on'
displayName: 'Test netcoreapp3.1,x64 on'
pool:
vmImage: $(imageName)
steps:
- template: 'build/azure-templates/run-tests-on-os.yml'
parameters:
osName: $(osName)
framework: 'netcoreapp3.1'
vsTestPlatform: 'x64'
testResultsArtifactName: '$(TestResultsArtifactName)'
maximumParallelJobs: $(maximumParallelJobs)
maximumAllowedFailures: $(maximumAllowedFailures)
Expand All @@ -343,31 +344,49 @@ stages:
imageName: 'macOS-10.14'
maximumParallelJobs: 7
maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
displayName: 'Test netcoreapp2.1 on'
displayName: 'Test netcoreapp2.1,x64 on'
pool:
vmImage: $(imageName)
steps:
- template: 'build/azure-templates/run-tests-on-os.yml'
parameters:
osName: $(osName)
framework: 'netcoreapp2.1'
vsTestPlatform: 'x64'
testResultsArtifactName: '$(TestResultsArtifactName)'
maximumParallelJobs: $(maximumParallelJobs)
maximumAllowedFailures: $(maximumAllowedFailures)

- job: Test_net48_Windows
- job: Test_net48_Windows_x64
condition: and(succeeded(), ne(variables['RunTests'], 'false'))
displayName: 'Test net48 on Windows'
displayName: 'Test net48,x64 on Windows'
pool:
vmImage: 'windows-2019'
steps:
- template: 'build/azure-templates/run-tests-on-os.yml'
parameters:
osName: 'Windows'
framework: 'net48'
vsTestPlatform: 'x64'
testResultsArtifactName: '$(TestResultsArtifactName)'
maximumParallelJobs: 8
maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
maximumAllowedFailures: 2 # Maximum allowed failures for a successful build

- job: Test_net48_Windows_x86
condition: and(succeeded(), ne(variables['RunTests'], 'false'))
displayName: 'Test net48,x86 on Windows'
pool:
vmImage: 'windows-2019'
steps:
- template: 'build/azure-templates/run-tests-on-os.yml'
parameters:
osName: 'Windows'
framework: 'net48'
vsTestPlatform: 'x86'
testResultsArtifactName: '$(TestResultsArtifactName)'
maximumParallelJobs: 8
maximumAllowedFailures: 5 # Maximum allowed failures for a successful build


- stage: Publish_Stage
displayName: 'Publish Stage:'
Expand Down
50 changes: 44 additions & 6 deletions build/azure-templates/publish-test-results-for-test-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# " testProjectName: '$projectName'`n" + `
# " osName: '$`{`{ parameters.osName `}`}'`n" + `
# " framework: '$`{`{ parameters.framework `}`}'`n" + `
# " vsTestPlatform: '$`{`{ parameters.vsTestPlatform `}`}'`n" + `
# " testResultsFormat: '$`{`{ parameters.testResultsFormat `}`}'`n" + `
# " testResultsArtifactName: '$`{`{ parameters.testResultsArtifactName `}`}'`n" + `
# " testResultsFileName: '$`{`{ parameters.testResultsFileName `}`}'`n" + `
Expand All @@ -47,6 +48,7 @@
parameters:
osName: '' # The name of the operating system for display purposes.
framework: '' # The target framework to publish.
vsTestPlatform: 'x64' # Target platform architecture used for test execution. Valid values are x86, x64, and ARM.
testResultsFormat: VSTest # Specify the format of the results files you want to publish. The following formats are supported: JUnit, NUnit, VSTest, XUnit, CTest
testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where the test results will be published. Default 'testresults'.
testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results. Default 'TestResults.trx'.
Expand All @@ -60,6 +62,8 @@ steps:
# }
# }
# EnsureNotNullOrEmpty('${{ parameters.osName }}', 'osName')
# EnsureNotNullOrEmpty('${{ parameters.framework }}', 'framework')
# EnsureNotNullOrEmpty('${{ parameters.vsTestPlatform }}', 'vsTestPlatform')
# EnsureNotNullOrEmpty('${{ parameters.testResultsFormat }}', 'testResultsFormat')
# EnsureNotNullOrEmpty('${{ parameters.testResultsArtifactName }}', 'testResultsArtifactName')
# EnsureNotNullOrEmpty('${{ parameters.testResultsFileName }}', 'testResultsFileName')
Expand All @@ -69,8 +73,9 @@ steps:
# Special case: Only supports .NET Standard 2.0
- template: publish-test-results.yml
parameters:
framework: 'netcoreapp2.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
testProjectName: 'Lucene.Net.Tests.CodeAnalysis'
framework: 'netcoreapp2.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
Expand All @@ -79,8 +84,9 @@ steps:
# Special case: Only supports .netcoreapp3.1
- template: publish-test-results.yml
parameters:
framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
testProjectName: 'Lucene.Net.Tests.Cli'
framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
Expand All @@ -89,8 +95,9 @@ steps:
# Special case: Only supports .net48
- template: publish-test-results.yml
parameters:
framework: 'net48' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
framework: 'net48' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
Expand All @@ -102,6 +109,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.ICU'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -111,6 +119,7 @@ steps:
testProjectName: 'Lucene.Net.Tests._A-D'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -120,6 +129,7 @@ steps:
testProjectName: 'Lucene.Net.Tests._E-I'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -129,6 +139,7 @@ steps:
testProjectName: 'Lucene.Net.Tests._I-J'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -138,6 +149,7 @@ steps:
testProjectName: 'Lucene.Net.Tests._J-S'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -147,6 +159,7 @@ steps:
testProjectName: 'Lucene.Net.Tests._T-Z'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -156,6 +169,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.Common'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -165,6 +179,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.Kuromoji'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -174,6 +189,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.Morfologik'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -183,6 +199,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.Phonetic'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -192,6 +209,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.SmartCn'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -201,6 +219,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Analysis.Stempel'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -210,6 +229,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Benchmark'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -219,6 +239,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Classification'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -228,6 +249,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Codecs'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -237,6 +259,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Demo'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -246,6 +269,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Expressions'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -255,6 +279,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Facet'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -264,6 +289,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Grouping'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -273,6 +299,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Highlighter'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -282,6 +309,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Join'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -291,6 +319,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Memory'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -300,6 +329,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Misc'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -309,6 +339,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Queries'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -318,6 +349,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.QueryParser'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -327,6 +359,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Replicator'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -336,6 +369,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Sandbox'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -345,6 +379,7 @@ steps:
testProjectName: 'Lucene.Net.Tests.Spatial'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Expand All @@ -354,24 +389,27 @@ steps:
testProjectName: 'Lucene.Net.Tests.Suggest'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'

- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.TestFramework'
testProjectName: 'Lucene.Net.Tests.TestFramework.DependencyInjection'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'

- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.TestFramework.DependencyInjection'
testProjectName: 'Lucene.Net.Tests.TestFramework'
osName: '${{ parameters.osName }}'
framework: '${{ parameters.framework }}'
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
Loading

0 comments on commit b8ab1eb

Please sign in to comment.