Bump Riok.Mapperly from 4.3.0 to 4.3.1 #52
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOTNET_VERSION: '9.0.x' | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| name: Build and Analyze | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Full history for better analysis | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', '**/Directory.Build.props') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Restore dependencies | |
| run: dotnet restore ICTAce.FileHub.slnx | |
| - name: Build solution | |
| run: dotnet build ICTAce.FileHub.slnx --configuration Release --no-restore | |
| - name: Verify analyzer enforcement | |
| run: | | |
| echo "Verifying code quality analyzers are enabled..." | |
| echo "✓ SonarAnalyzer.CSharp" | |
| echo "✓ Meziantou.Analyzer" | |
| echo "✓ AsyncFixer" | |
| echo "✓ Roslynator.Analyzers" | |
| echo "Build completed with analyzer checks enforced" | |
| test-server: | |
| name: Server Unit Tests (TUnit) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', '**/Directory.Build.props') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Restore dependencies | |
| run: dotnet restore Server.Tests/ICTAce.FileHub.Server.Tests.csproj | |
| - name: Build test project | |
| run: dotnet build Server.Tests/ICTAce.FileHub.Server.Tests.csproj --configuration Release --no-restore | |
| - name: Run server tests | |
| run: dotnet test Server.Tests/ICTAce.FileHub.Server.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=server-test-results.trx" | |
| continue-on-error: true | |
| - name: Upload server test results | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: server-test-results | |
| path: Server.Tests/TestResults/*.trx | |
| retention-days: 30 | |
| test-client: | |
| name: Client Component Tests (bUnit) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', '**/Directory.Build.props') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Restore dependencies | |
| run: dotnet restore Client.Tests/ICTAce.FileHub.Client.Tests.csproj | |
| - name: Build test project | |
| run: dotnet build Client.Tests/ICTAce.FileHub.Client.Tests.csproj --configuration Release --no-restore | |
| - name: Run client component tests | |
| run: dotnet test Client.Tests/ICTAce.FileHub.Client.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=client-test-results.trx" | |
| continue-on-error: true | |
| - name: Upload client test results | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: client-test-results | |
| path: Client.Tests/TestResults/*.trx | |
| retention-days: 30 | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-server, test-client] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "## Test Execution Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Server Unit Tests: ${{ needs.test-server.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Client Component Tests: ${{ needs.test-client.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Code Quality Checks" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✓ SonarAnalyzer.CSharp" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✓ Meziantou.Analyzer" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✓ AsyncFixer" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✓ Roslynator.Analyzers" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✓ BannedApiAnalyzers" >> $GITHUB_STEP_SUMMARY | |
| - name: Fail if any tests failed | |
| if: needs.test-server.result == 'failure' || needs.test-client.result == 'failure' | |
| run: | | |
| echo "❌ One or more test jobs failed" | |
| exit 1 |