Skip to content

.NET Run Tests

This Composite Action runs whatever tests are set as default for the current Solution.

.NET Run Tests

- uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-tests-run@main

Runs the tests of the current Solution.

Inputs: ยค

Name Description Default
dotnet-version

The .NET version to install.

10.0.x
dotnet-project-path

Path to the .NET project to test.

.
Source of Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-tests-run@main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: '.NET Run Tests'
description: 'Runs the tests of the current Solution.'

inputs:
  dotnet-version:
    description: 'The .NET version to install.'
    default: '10.0.x'
    required: false
  dotnet-project-path:
    description: 'Path to the .NET project to test.'
    default: '.'
    required: false

runs:
  using: composite

  steps:
    - name: 'Setup .NET'
      uses: actions/setup-dotnet@v5
      with:
        dotnet-version: ${{ inputs.dotnet-version }}

    - name: 'Run .NET tests'
      shell: bash
      run: dotnet test ${{ inputs.dotnet-project-path }}