.NET Tests #1903
Workflow file for this run
This file contains hidden or 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
| name: .NET Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - '**.cs' | |
| - '**.csproj' | |
| - '**.sln' | |
| - '.github/workflows/dotnet-test.yml' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - '**.cs' | |
| - '**.csproj' | |
| - '**.sln' | |
| - '.github/workflows/dotnet-test.yml' | |
| workflow_dispatch: | |
| jobs: | |
| test-codebase: | |
| runs-on: windows-latest | |
| env: | |
| NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| # Install the .NET Core workload | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.NUGET_PACKAGES }} | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| # - name: Install WinGet | |
| # uses: Cyberboss/install-winget@v1 | |
| - name: Install dependencies | |
| working-directory: src | |
| run: dotnet restore UniGetUI.sln | |
| # - name: Test build | |
| # working-directory: src | |
| # run: dotnet build --configuration Release | |
| - name: Run Tests | |
| working-directory: src | |
| run: dotnet test UniGetUI.sln --no-restore --verbosity q --nologo | |