11# This workflow is used test the project, by doing the following
22# 1. Ensure the project builds
3- # 2. Run unit tests
4- # 3. Upload code coverage
53---
64name : Testing Matrix
7- run-name : PR#${{ github.event.number }}${{ github.event.pull_request.draft && ' [DRAFT]' || '' }} - Continuous Testing (Matrix) - (${{ github.event.pull_request.head.ref }}-to-${{ github.event.pull_request.base.ref }})
5+ run-name : >-
6+ ${{
7+ format(
8+ '{0}{1}{2} - Continuous Testing (Matrix) - ({3}-to-{4})',
9+ github.event_name == 'pull_request' && 'PR#' || 'Push',
10+ github.event.pull_request.draft && ' [DRAFT]' || '',
11+ github.event_name == 'pull_request' && github.event.number || format(' [{0}]',github.ref_name),
12+ github.event.pull_request.head.ref,
13+ github.event.pull_request.base.ref
14+ )
15+ }}
816
917on :
1018 pull_request :
@@ -51,14 +59,16 @@ jobs:
5159 # ## Initialize ###
5260 # ###################################################################################################
5361 # Check for Changes in the Non-Ignored Files; If there are none, then Skip Tests
54- # Skip: README, LICENSE, .gitignore, GitHub Workflows & Actions, etc.
62+ # Skip: README, CHANGELOG, LICENSE, THIRD-PARTY-LICENSES , .gitignore, GitHub Workflows & Actions, etc.
5563 - name : Check for Changes to Determine if Tests can be Skipped
5664 id : getChanges
5765 uses : tj-actions/changed-files@v45.0.3
5866 with :
5967 files_ignore : |
6068 README.md
69+ CHANGELOG.md
6170 LICENSE
71+ THIRD-PARTY-LICENSES
6272 .github/**
6373 .gitignore
6474
@@ -77,14 +87,17 @@ jobs:
7787 # ## Prepare to Run Tests ###
7888 # ###################################################################################################
7989 - name : Setup .NET [${{ matrix.dotnet-version }}]
90+ if : ${{ !fromJSON(steps.getCanSkip.outputs.result) }}
8091 uses : actions/setup-dotnet@v4
8192 with :
8293 dotnet-version : ${{ matrix.dotnet-version }}
8394
8495 - name : Setup NuGet
96+ if : ${{ !fromJSON(steps.getCanSkip.outputs.result) }}
8597 uses : NuGet/setup-nuget@v2.0.0
8698
8799 - name : Restore NuGet
100+ if : ${{ !fromJSON(steps.getCanSkip.outputs.result) }}
88101 run : nuget restore
89102
90103 - name : Restore Dependencies
@@ -105,17 +118,6 @@ jobs:
105118 with :
106119 message : " [Error] Build Failed for ${{ matrix.solution }}"
107120
108- # Test 2 - Run All Unit Tests within Project
109- - name : Run Tests for [${{ matrix.solution }}]
110- if : ${{ !fromJSON(steps.getCanSkip.outputs.result) }}
111- run : dotnet test --no-build --verbosity normal --collect "XPlat Code Coverage"
112-
113- - name : Error - Tests Failed for ${{ matrix.solution }}
114- if : failure()
115- uses : ./.github/actions/tools/annotation/error
116- with :
117- message : " [Error] Tests Failed for ${{ matrix.solution }}"
118-
119121 # ###################################################################################################
120122 # ## Notify Success ###
121123 # ###################################################################################################
0 commit comments