Skip to content
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

Prkrishn/code coverage #2308

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will reference this new file?

"version": 1,
"isRoot": true,
"tools": {
"coverlet.console": {
"version": "1.5.51-ged9195d73b",
"commands": [
"coverlet"
]
},
"dotnet-reportgenerator-globaltool": {
"version": "4.1.6",
"commands": [
"reportgenerator"
]
}
}
}
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="test" value="https://www.myget.org/F/2c042c750fe047a1b5ed74bbd75bcd89/api/v3/index.json" />
<add key="coverlet-dev" value="https://www.myget.org/F/coverlet-dev/api/v3/index.json" />
</packageSources>
</configuration>
22 changes: 10 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,9 @@ stages:
arguments: 'locals all -clear'
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_BuildArgs)
displayName: Build and Publish
- script: eng\scripts\ci-flaky-tests.cmd -configuration $(_BuildConfig)
displayName: Run Flaky Tests
continueOnError: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. Why are you removing the flaky test run?

- powershell: eng\scripts\KillProcesses.ps1
displayName: Kill processes
condition: always()
- task: PublishTestResults@2
displayName: Publish Flaky Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Upload TestResults
condition: always()
Expand All @@ -131,6 +120,15 @@ stages:
artifactName: $(Agent.Os)_$(Agent.JobName) TestResults
artifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Upload Code Coverage results
condition: always()
continueOnError: true
inputs:
pathtoPublish: artifacts/log/$(_BuildConfig)/codecoverage/
artifactName: $(Agent.Os)_$(Agent.JobName) CodeCoverage
artifactType: Container
parallel: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these files included when all of artifacts/log is uploaded?

- task: PublishBuildArtifacts@1
displayName: Upload package artifacts
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
Expand Down Expand Up @@ -308,4 +306,4 @@ stages:
parameters:
# Symbol validation isn't being very reliable lately. This should be enabled back
# once this issue is resolved: https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
enableSymbolValidation: false
2 changes: 1 addition & 1 deletion eng/common/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test /p:RunCodeCoverage=true -ci %*"
6 changes: 3 additions & 3 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ function Build {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
# Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
[string[]] $msbuildArgs = $properties
# Resolve relative project paths into full paths

# Resolve relative project paths into full paths
$projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')

$msbuildArgs += "/p:Projects=$projects"
$properties = $msbuildArgs
}
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19458.2",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19458.2"
"Microsoft.DotNet.Arcade.Sdk": "4.0.0-dev",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19454.31"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not change this portion of the file directly. Need to update the dependencies from Arcade i.e. get darc to change Versions.props and Version.Details.xml as well.

In your branch, execute

darc update-dependencies --source-repo arcade  --channel '.NET Tools - Latest'

or

darc update-dependencies --source-repo arcade  --channel '.NET 3 Tools'

}
}