-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test against all built #6927
Test against all built #6927
Changes from 4 commits
ae7e84d
5ec6949
eaa4b0e
65f8ab0
d787444
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,38 @@ parameters: | |
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
JavaVersion: '1.8' | ||
RunTitle: 'Linux on Java 1.8' | ||
macOS - Java 8: | ||
OSName: 'macOS' | ||
OSVmImage: 'macOS-10.13' | ||
JavaVersion: '1.8' | ||
RunTitle: 'macOS on Java 1.8' | ||
Windows - Java 8: | ||
OSName: 'Windows' | ||
OSVmImage: 'windows-2019' | ||
JavaVersion: '1.8' | ||
RunTitle: 'Windows on Java 1.8' | ||
Linux - Java 11: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
JavaVersion: '1.11' | ||
RunTitle: 'Linux on Java 1.11' | ||
macOS - Java 11: | ||
OSName: 'macOS' | ||
OSVmImage: 'macOS-10.13' | ||
JavaVersion: '1.11' | ||
RunTitle: 'macOS on Java 1.11' | ||
Windows - Java 11: | ||
OSName: 'Windows' | ||
OSVmImage: 'windows-2019' | ||
JavaVersion: '1.11' | ||
RunTitle: 'Windows on Java 1.11' | ||
Windows From Source - Java 8: | ||
OSName: 'Windows' | ||
OSVmImage: 'windows-2019' | ||
JavaVersion: '1.8' | ||
RunTitle: 'From Source: Windows on Java 1.8' | ||
TestFromSource: true | ||
|
||
jobs: | ||
- job: 'Build' | ||
|
@@ -277,6 +289,36 @@ jobs: | |
|
||
- ${{ parameters.PreTestSteps }} | ||
|
||
# JRSSTART | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.6' | ||
inputs: | ||
versionSpec: '3.6' | ||
condition: and(ne(variables['SdkType'], 'data'), eq(variables['TestFromSource'],'true')) | ||
|
||
- pwsh: | | ||
python --version | ||
python eng/versioning/set_versions.py --build-type client --pst | ||
if ($LastExitCode -eq 5678) { | ||
echo "##vso[task.setvariable variable=ShouldRunSourceTests]$true" | ||
echo "Changes detected, return code from set_versions.py is $($LastExitCode)" | ||
exit 0 | ||
} elseif ($LastExitCode -eq 0) { | ||
echo "No changes detected, return code from set_versions.py is $($LastExitCode)" | ||
exit 0 | ||
} else { | ||
echo "Invalid return code from set_versions.py, return code is $($LastExitCode)" | ||
exit 1 | ||
} | ||
displayName: 'Setup for source build' | ||
condition: and(ne(variables['SdkType'], 'data'), eq(variables['TestFromSource'],'true')) | ||
|
||
- script: | | ||
python --version | ||
python eng/versioning/update_versions.py --update-type library --build-type client | ||
condition: eq(variables['ShouldRunSourceTests'],'true') | ||
displayName: 'Setup for source build' | ||
|
||
- task: Maven@3 | ||
displayName: 'Run tests' | ||
inputs: | ||
|
@@ -288,9 +330,12 @@ jobs: | |
jdkArchitectureOption: 'x64' | ||
publishJUnitResults: false | ||
goals: ${{ parameters.TestGoals }} | ||
# we want to run this when TestFromSource isn't true (which covers normal running when it isn't set) | ||
# OR when ShouldRunSourceTests is true | ||
condition: or(ne(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are going to want to and this condition with "succeeded" https://docs.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#succeeded so that we don't end up trying to run this step when some other step already failed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. Updated with latest commit. |
||
|
||
- task: PublishTestResults@2 | ||
condition: always() | ||
condition: and(always(), or(ne(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true'))) | ||
inputs: | ||
mergeTestResults: true | ||
testRunTitle: '$(OSName) on Java $(JavaVersion)' | ||
testRunTitle: $(RunTitle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you planned to remove this JRSSTART comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed with 5th commit.