-
Notifications
You must be signed in to change notification settings - Fork 805
.NET: Migrate to xunit.v3 #2259
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
base: main
Are you sure you want to change the base?
Changes from all commits
2f12e4d
f26ecb7
d76e887
c644a02
5ff6091
7ea499d
5c34fbd
7088bd6
d49da2e
10fce0d
1753023
2bda7d5
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 |
|---|---|---|
|
|
@@ -80,7 +80,7 @@ jobs: | |
| - name: Setup dotnet | ||
| uses: actions/[email protected] | ||
| with: | ||
| global-json-file: ${{ github.workspace }}/dotnet/global.json | ||
| global-json-file: ${{ github.workspace }}/global.json | ||
| - name: Build dotnet solutions | ||
| shell: bash | ||
| run: | | ||
|
|
@@ -133,7 +133,7 @@ jobs: | |
|
|
||
| # Check if the project supports the target framework | ||
| if [[ "$target_frameworks" == *"${{ matrix.targetFramework }}"* ]]; then | ||
| dotnet test -f ${{ matrix.targetFramework }} -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx --collect:"XPlat Code Coverage" --results-directory:"TestResults/Coverage/" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute | ||
| dotnet test -f ${{ matrix.targetFramework }} -c ${{ matrix.configuration }} --project $project --no-progress --no-build -v Normal --report-trx --results-directory "TestResults/Coverage/" --coverage --coverage-output-format cobertura --coverage-settings "${{ github.workspace }}/dotnet/coverage.config" | ||
| else | ||
| echo "Skipping $project - does not support target framework ${{ matrix.targetFramework }} (supports: $target_frameworks)" | ||
| fi | ||
|
|
@@ -170,7 +170,7 @@ jobs: | |
|
|
||
| # Check if the project supports the target framework | ||
| if [[ "$target_frameworks" == *"${{ matrix.targetFramework }}"* ]]; then | ||
| dotnet test -f ${{ matrix.targetFramework }} -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx | ||
| dotnet test -f ${{ matrix.targetFramework }} -c ${{ matrix.configuration }} --project $project --no-progress --no-build -v Normal --report-trx | ||
| else | ||
| echo "Skipping $project - does not support target framework ${{ matrix.targetFramework }} (supports: $target_frameworks)" | ||
| fi | ||
|
|
@@ -196,7 +196,7 @@ jobs: | |
| - name: Generate test reports | ||
| uses: danielpalme/[email protected] | ||
| with: | ||
| reports: "./TestResults/Coverage/**/coverage.cobertura.xml" | ||
| reports: "./TestResults/Coverage/**/*.cobertura.xml" | ||
| targetdir: "./TestResults/Reports" | ||
| reporttypes: "HtmlInline;JsonSummary" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Configuration> | ||
| <CodeCoverage> | ||
| <!-- Match attributes on any code element: --> | ||
| <Attributes> | ||
| <Exclude> | ||
| <!-- Don't forget "Attribute" at the end of the name --> | ||
| <Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute> | ||
| <Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute> | ||
| <Attribute>^System\.Runtime\.CompilerServices\.CompilerGeneratedAttribute$</Attribute> | ||
| </Exclude> | ||
| </Attributes> | ||
| </CodeCoverage> | ||
| </Configuration> |
|
Member
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. Why is global moved to the repo root? This is a Suggest not changing it to .Net 10 as this is not the purpose of the PR.
Member
Author
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. The move to repo root is to allow running The switch to .NET 10 is kinda related, as that's what works best with xunit.v3 and Microsoft.Testing.Platform v2. I'm fine getting a PR for updating to .NET 10 first separately though.
Member
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. Thanks!
Contributor
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. But you have changed the CI as well to point to a different location:
instead of
I dont think there is a problem with having global.json under
Member
Author
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. The Having it under |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.