-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full test coverage using Github Workflows (#2483)
* new builds for other solutions * fix name * remove ubuntu * typo * testing additional frameworks * typo * test, remove exclude * full framework coverage * cleanup * cleanup * typo
- Loading branch information
1 parent
4451e34
commit 26002b5
Showing
4 changed files
with
135 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | ||
# .NET CLI: https://docs.microsoft.com/dotnet/core/tools/ | ||
# Description: The purpose of this workflow is to compile and run unit tests. | ||
|
||
name: Build And Test, LOGGING | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build-test-LOGGING: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
SOLUTION: ./LOGGING/Logging.sln | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
framework: [net452, net462, net472, net480, netcoreapp3.1, net5.0, net6.0] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '3.1.x' | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.x' | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
|
||
- name: Restore | ||
run: dotnet restore ${{ env.SOLUTION }} | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore | ||
|
||
- name: Test | ||
id: test1 | ||
continue-on-error: true | ||
run: dotnet test ${{ env.SOLUTION }} --framework ${{ matrix.framework }} --configuration Release --no-build --logger:"console;verbosity=detailed" --logger:"trx;logfilename=${{ github.workspace }}/testResults.trx" ${{ matrix.args }} | ||
|
||
- name: Retry tests | ||
if: steps.test1.outcome=='failure' | ||
run: pwsh -f ./.scripts/build_RetryTests.ps1 -TestResultFile ${{ github.workspace }}/testResults.trx -WorkingDirectory ${{ github.workspace }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | ||
# .NET CLI: https://docs.microsoft.com/dotnet/core/tools/ | ||
# Description: The purpose of this workflow is to compile and run unit tests. | ||
|
||
name: Build And Test, WEB | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build-test-WEB: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
SOLUTION: ./WEB/Src/Microsoft.ApplicationInsights.Web.sln | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
framework: [net452, net462, net472, net480, netcoreapp3.1, net5.0, net6.0] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '3.1.x' | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.x' | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
|
||
- name: Restore | ||
run: dotnet restore ${{ env.SOLUTION }} | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore | ||
|
||
- name: Test | ||
id: test1 | ||
continue-on-error: true | ||
run: dotnet test ${{ env.SOLUTION }} --framework ${{ matrix.framework }} --configuration Release --no-build --logger:"console;verbosity=detailed" --logger:"trx;logfilename=${{ github.workspace }}/testResults.trx" ${{ matrix.args }} | ||
|
||
- name: Retry tests | ||
if: steps.test1.outcome=='failure' | ||
run: pwsh -f ./.scripts/build_RetryTests.ps1 -TestResultFile ${{ github.workspace }}/testResults.trx -WorkingDirectory ${{ github.workspace }} | ||
|