Skip to content

Commit

Permalink
feat: Removed testfilter property
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion committed Jun 4, 2024
1 parent 065decb commit 7b4c924
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/cicd-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ on:
required: false
type: string
default: quiet
dotnet-testfilter:
required: false
type: string
default: ''
dotnet-version:
required: false
type: string
Expand Down Expand Up @@ -112,7 +108,6 @@ jobs:
enableSonarQube: ${{ inputs.enableSonarQube || false }}
disableCoverageUpload: ${{ inputs.disableCoverageUpload || false }}
dotnet-logging: ${{ inputs.dotnet-logging || 'quiet' }}
dotnet-testfilter: ${{ inputs.dotnet-testfilter }}
dotnet-version: ${{ inputs.dotnet-version || '8.x' }}
dotnet-quality: ${{ inputs.dotnet-quality || 'ga' }}
runs-on: ${{ inputs.runs-on-tests || inputs.runs-on-build || 'ubuntu-latest' }}
Expand Down
25 changes: 2 additions & 23 deletions .github/workflows/step-dotnet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
required: false
type: string
default: quiet
dotnet-testfilter:
required: false
type: string
default: ''
dotnet-version:
required: false
type: string
Expand Down Expand Up @@ -48,29 +44,12 @@ on:
required: false

jobs:
pretest:
name: Prepare Test Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- name: Generate Matrix
id: generate
run: |
echo "matrix=${{ format('[{0}]', inputs.dotnet-testfilter == '' && '''none''' || inputs.dotnet-testfilter) }}" >> $GITHUB_OUTPUT
testing:
name: Testing .NET solution
runs-on: ${{ inputs.runs-on || 'ubuntu-latest' }}
needs:
- pretest
env:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

strategy:
matrix:
testfilter: ${{ fromJson(needs.pretest.outputs.matrix) }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -115,7 +94,7 @@ jobs:
- name: Test
id: test
run: |
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnet-logging }} --no-build --no-restore --collect:"XPlat Code Coverage" ${{ matrix.testfilter != 'none' && format('--filter "TestCategory={0}"', matrix.testfilter) || '' }} /p:GeneratePackageOnBuild=false -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnet-logging }} --no-build --no-restore --collect:"XPlat Code Coverage" /p:GeneratePackageOnBuild=false -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Stop SonarQube Analysis
if: ${{ inputs.enableSonarQube == true && (success() || steps.test.conclusion == 'failure') }}
Expand All @@ -138,6 +117,6 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ inputs.disableCoverageUpload == false }}
with:
name: "coverage${{ matrix.testfilter != 'none' && format('-{0}', matrix.testfilter) || '' }}"
name: "coverage"
path: |
**/TestResults/**/*.opencover.xml

0 comments on commit 7b4c924

Please sign in to comment.