Skip to content

Commit e01306a

Browse files
authored
Update GitHub Action to run unit tests (#3089)
* Update GitHub Action to run unit tests - fix filters, update task versions. * Fix test filters. * Set verbosity to normal
1 parent 36e1fd7 commit e01306a

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Id Web GitHub Action Test"
1+
name: "Run unit tests"
22

33
on:
44
push:
@@ -17,60 +17,60 @@ jobs:
1717
build:
1818
runs-on: windows-latest
1919
continue-on-error: true
20-
name: "Id Web GitHub Action Test"
20+
name: "Build and run unit tests"
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v2.3.4
23+
uses: actions/checkout@v4.2.1
2424

25-
- name: Setup .NET 6.0.301
26-
uses: actions/setup-dotnet@v2.1.0
25+
- name: Setup .NET 6.0.x
26+
uses: actions/setup-dotnet@v4.0.1
2727
with:
28-
dotnet-version: 6.0.301
28+
dotnet-version: 6.0.x
2929

3030
- name: Setup .NET 7.0.x
31-
uses: actions/setup-dotnet@v2.1.0
31+
uses: actions/setup-dotnet@v4.0.1
3232
with:
3333
dotnet-version: 7.0.x
3434

3535
- name: Setup .NET 8.0.x
36-
uses: actions/setup-dotnet@v2.1.0
36+
uses: actions/setup-dotnet@v4.0.1
3737
with:
3838
dotnet-version: 8.0.x
3939

4040
- name: Setup .NET 9.0.x
41-
uses: actions/setup-dotnet@v2.1.0
41+
uses: actions/setup-dotnet@v4.0.1
4242
with:
4343
dotnet-version: 9.0.100-rc.2.24474.11
4444

45-
- name: 'Setup msbuild'
46-
uses: microsoft/setup-msbuild@v1.1
45+
- name: 'Setup MSBuild'
46+
uses: microsoft/setup-msbuild@v2
4747
with:
4848
msbuild-architecture: x64
4949

5050
- name: Setup wasm-tools
5151
run: dotnet workload install wasm-tools
5252

53-
- name: Build IdWeb for release
53+
- name: Build solution
5454
run: msbuild Microsoft.Identity.Web.sln -r -t:build -verbosity:m -property:Configuration=Release
5555

5656
- name: Test with .NET 6.0.x
57-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net6.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)"
57+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net6.0 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
5858

5959
- name: Test with .NET 7.0.x
60-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net7.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
60+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net7.0 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
6161

6262
- name: Test with .NET 8.0.x
63-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net8.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
63+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net8.0 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
6464

6565
- name: Test with .NET 9.0.x
66-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net9.0 -p:FROM_GITHUB_ACTION=true -p:TargetNet9=True --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
66+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net9.0 -v normal -p:FROM_GITHUB_ACTION=true -p:TargetNet9=True --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"
6767

6868
- name: Test with .NET 462
69-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net462 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
69+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net462 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)"
7070

7171
- name: Test with .NET 472
72-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net472 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
72+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net472 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)"
7373

74-
- name: Test with .NET standard2.0
75-
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f netstandard2.0 -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName=IntegrationTests)"
74+
- name: Test with .NET Standard 2.0
75+
run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f netstandard2.0 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)"
7676

tests/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<XunitVersion>2.9.2</XunitVersion>
1919
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
2020
<XunitAssertVersion>2.9.2</XunitAssertVersion>
21-
<XunitExtensibilityCoreVersion>2.4.2</XunitExtensibilityCoreVersion>
21+
<XunitExtensibilityCoreVersion>2.9.2</XunitExtensibilityCoreVersion>
2222
<NSubstituteVersion>4.2.2</NSubstituteVersion>
2323
<NSubstituteAnalyzersCSharpVersion>1.0.13</NSubstituteAnalyzersCSharpVersion>
2424
<CoverletCollectorVersion>3.1.2</CoverletCollectorVersion>

0 commit comments

Comments
 (0)