Skip to content

Commit f38e236

Browse files
committed
update build scripts
1 parent 0c3f0f7 commit f38e236

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

Documentation/VSTestIntegration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A sample project file looks like:
1414
```xml
1515
<Project Sdk="Microsoft.NET.Sdk">
1616
<PropertyGroup>
17-
<TargetFrameworks>net6.0;net48</TargetFrameworks>
17+
<TargetFramework>net8.0</TargetFramework>
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<!-- Minimum version 17.7.0 -->

eng/azure-pipelines.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,36 @@ jobs:
1616
strategy:
1717
matrix:
1818
Debug:
19-
buildConfiguration: "Debug"
19+
buildConfiguration: "debug"
2020
Release:
21-
buildConfiguration: "Release"
21+
buildConfiguration: "release"
2222
pool:
2323
vmImage: 'windows-latest'
2424
steps:
2525
- template: build.yml
2626
- task: CopyFiles@2
2727
displayName: Collect packages
2828
inputs:
29-
SourceFolder: artifacts\package\$(BuildConfiguration)
29+
SourceFolder: artifacts\package\$(buildConfiguration)
3030
Contents: |
3131
*.nupkg
3232
*.snupkg
3333
TargetFolder: $(Build.ArtifactStagingDirectory)\Packages
34-
condition: eq(variables['BuildConfiguration'], 'Release')
34+
condition: eq(variables['buildConfiguration'], 'release')
3535
- task: PublishBuildArtifacts@1
3636
displayName: Publish packages as build artifacts
3737
inputs:
3838
PathtoPublish: $(Build.ArtifactStagingDirectory)\Packages
3939
ArtifactName: Packages
4040
publishLocation: Container
41-
condition: eq(variables['BuildConfiguration'], 'Release')
41+
condition: eq(variables['buildConfiguration'], 'release')
4242
- task: PublishBuildArtifacts@1
4343
displayName: Publish tests artifacts
4444
inputs:
4545
PathtoPublish: $(Build.SourcesDirectory)\artifacts\publish
4646
ArtifactName: PublishedTests
4747
publishLocation: Container
48-
condition: eq(variables['BuildConfiguration'], 'Debug')
48+
condition: eq(variables['buildConfiguration'], 'debug')
4949
- template: CheckNugetStatus.yml
5050
parameters:
5151
sourcePath: '$(Build.SourcesDirectory)/src'
@@ -60,9 +60,9 @@ jobs:
6060
strategy:
6161
matrix:
6262
Debug:
63-
buildConfiguration: "Debug"
63+
buildConfiguration: "debug"
6464
Release:
65-
buildConfiguration: "Release"
65+
buildConfiguration: "release"
6666
pool:
6767
vmImage: 'macOS-latest'
6868
steps:
@@ -76,9 +76,9 @@ jobs:
7676
strategy:
7777
matrix:
7878
Debug:
79-
buildConfiguration: "Debug"
79+
buildConfiguration: "debug"
8080
Release:
81-
buildConfiguration: "Release"
81+
buildConfiguration: "release"
8282
pool:
8383
vmImage: 'ubuntu-latest'
8484
steps:

eng/build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dotnet build -c debug -bl:build.msbuild.binlog
2+
dotnet pack -c debug
3+
dotnet pack -c release
4+
dotnet test test/coverlet.core.tests/coverlet.core.tests.csproj -c debug --no-build -bl:test.core.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.tests.trx" --diagnostic --diagnostic-output-directory "artifacts/log/debug" --diagnostic-output-fileprefix "coverlet.core.tests"
5+
dotnet test test/coverlet.core.coverage.tests/coverlet.core.coverage.tests.csproj -c debug --no-build -bl:test.core.coverage.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.coverage.tests.trx" --diagnostic --diagnostic-output-directory "artifacts/log/debug" --diagnostic-output-fileprefix "coverlet.core.coverage.tests"
6+
dotnet test test/coverlet.msbuild.tasks.tests/coverlet.msbuild.tasks.tests.csproj -c debug --no-build -bl:test.msbuild.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory:"artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.msbuild.tasks.tests.trx" --diagnostic --diagnostic-output-directory "artifacts/log/debug" --diagnostic-output-fileprefix "coverlet.msbuild.tasks.tests"
7+
dotnet test test/coverlet.collector.tests/coverlet.collector.tests.csproj -c debug --no-build -bl:test.collector.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" --diag:"artifacts/log/debug/coverlet.collector.test.diag.log;tracelevel=verbose"
8+
dotnet test test/coverlet.integration.tests/coverlet.integration.tests.csproj -c debug --no-build -bl:test.integration.binlog -- --results-directory "artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.integration.tests.trx" --diagnostic --diagnostic-output-directory "artifacts/log/debug" --diagnostic-output-fileprefix "coverlet.integration.tests"

eng/build.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ steps:
2525
displayName: Pack
2626

2727
- script: |
28-
dotnet test test/coverlet.core.tests/coverlet.core.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "$(Build.SourcesDirectory)\artifacts\Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)\artifacts\log\$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.core.tests"
29-
dotnet test test/coverlet.core.coverage.tests/coverlet.core.coverage.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.coverage.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "$(Build.SourcesDirectory)\artifacts\Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.coverage.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)\artifacts\log\$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.core.coverage.tests"
30-
dotnet test test/coverlet.msbuild.tasks.tests/coverlet.msbuild.tasks.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.msbuild.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory:"$(Build.SourcesDirectory)\artifacts\Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.msbuild.tasks.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)\artifacts\log\$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.msbuild.tasks.tests"
31-
dotnet test test/coverlet.collector.tests/coverlet.collector.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.collector.binlog --results-directory:"$(Build.SourcesDirectory)\artifacts\Reports" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" --diag:"$(Build.SourcesDirectory)\artifacts\log\$(buildConfiguration)\coverlet.collector.test.diag.log;tracelevel=verbose"
32-
dotnet test test/coverlet.integration.tests/coverlet.integration.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.integration.binlog -- --results-directory "C:\GitHub\coverlet\artifacts\Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.integration.tests.trx" --diagnostic --diagnostic-output-fileprefix "coverlet.integration.tests"
28+
dotnet test test/coverlet.core.tests/coverlet.core.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "$(Build.SourcesDirectory)/artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.core.tests"
29+
dotnet test test/coverlet.core.coverage.tests/coverlet.core.coverage.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.core.coverage.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory "$(Build.SourcesDirectory)/artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.core.coverage.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.core.coverage.tests"
30+
dotnet test test/coverlet.msbuild.tasks.tests/coverlet.msbuild.tasks.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.msbuild.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" -- --results-directory:"$(Build.SourcesDirectory)/artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.msbuild.tasks.tests.trx" --diagnostic --diagnostic-output-directory "$(Build.SourcesDirectory)/artifacts/log/$(buildConfiguration)" --diagnostic-output-fileprefix "coverlet.msbuild.tasks.tests"
31+
dotnet test test/coverlet.collector.tests/coverlet.collector.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.collector.binlog /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.projectsample]*" /p:ExcludeByAttribute="GeneratedCodeAttribute" --diag:"$(Build.SourcesDirectory)/artifacts/log/$(buildConfiguration)/coverlet.collector.test.diag.log;tracelevel=verbose"
32+
dotnet test test/coverlet.integration.tests/coverlet.integration.tests.csproj -c $(BuildConfiguration) --no-build -bl:test.integration.binlog -- --results-directory "$(Build.SourcesDirectory)/artifacts/Reports" --report-xunit-trx --report-xunit-trx-filename "coverlet.integration.tests.trx" --diagnostic --diagnostic-output-fileprefix "coverlet.integration.tests"
3333
3434
displayName: Run unit tests with coverage
3535
env:
@@ -50,6 +50,6 @@ steps:
5050
- template: publish-coverage-results.yml
5151
parameters:
5252
reports: $(Build.SourcesDirectory)\**\*.opencover.xml
53-
condition: and(succeededORFailed(), eq(variables['BuildConfiguration'], 'Debug'), eq(variables['agent.os'], 'Windows_NT'))
53+
condition: and(succeededORFailed(), eq(variables['buildConfiguration'], 'debug'), eq(variables['agent.os'], 'Windows_NT'))
5454
assemblyfilters: '-xunit;-coverlet.testsubject;-Coverlet.Tests.ProjectSample.*;-coverlet.core.tests.samples.netstandard;-coverletsamplelib.integration.template;-coverlet.tests.utils'
5555

src/coverlet.console/coverlet.console.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ToolCommandName>coverlet</ToolCommandName>
77
<PackAsTool>true</PackAsTool>
88
<AssemblyTitle>coverlet.console</AssemblyTitle>

0 commit comments

Comments
 (0)