Develop (#14) #188
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: "CI" | |
| on: | |
| push: | |
| branches: [ develop, main ] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| Solution: "src/CleanMyPosts.sln" | |
| Test_Project: "src/Tests/Tests.csproj" | |
| FORCE_COLOR: "true" | |
| DOTNET_LOGGING__CONSOLE__COLORBEHAVIOR: Enabled | |
| FA_LICENSE_MESSAGE_SUPPRESS: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.x | |
| - name: Install .NET Tools (local) | |
| run: | | |
| dotnet new tool-manifest | |
| dotnet tool install dotnet-reportgenerator-globaltool | |
| - name: Restore | |
| run: dotnet restore "${{ env.Solution }}" | |
| - name: Build and Test | |
| run: | | |
| dotnet build "${{ env.Solution }}" --configuration Release --no-restore | |
| dotnet test "${{ env.Test_Project }}" ` | |
| --collect:"XPlat Code Coverage" ` | |
| --results-directory TestResults/Tests ` | |
| --configuration Release ` | |
| --logger "console;verbosity=detailed" ` | |
| --filter "TestCategory!=Long-Running" | |
| dotnet tool run reportgenerator ` | |
| -reports:TestResults/**/coverage.cobertura.xml ` | |
| -targetdir:TestResults/Reports ` | |
| -reporttypes:"Html;lcov;Cobertura" ` | |
| - name: Upload Test Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-coverage-report | |
| path: TestResults/Reports |