chore(docker): Bump dotnet/sdk from 8.0 to 10.0 #6
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, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| DOTNET_VERSION: '8.0.x' | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Run Unit Tests | |
| run: | | |
| dotnet test tests/OrderMonitor.UnitTests/OrderMonitor.UnitTests.csproj \ | |
| --no-build \ | |
| --configuration Release \ | |
| --logger "trx;LogFileName=unit-test-results.trx" \ | |
| --collect:"XPlat Code Coverage" \ | |
| --results-directory ./TestResults | |
| - name: Run Integration Tests | |
| run: | | |
| dotnet test tests/OrderMonitor.IntegrationTests/OrderMonitor.IntegrationTests.csproj \ | |
| --no-build \ | |
| --configuration Release \ | |
| --logger "trx;LogFileName=integration-test-results.trx" \ | |
| --results-directory ./TestResults | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: ./TestResults | |
| retention-days: 7 | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: ./TestResults/**/coverage.cobertura.xml | |
| retention-days: 7 | |
| - name: Code Coverage Summary | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| if: always() | |
| with: | |
| filename: ./TestResults/**/coverage.cobertura.xml | |
| badge: true | |
| format: markdown | |
| output: both | |
| thresholds: '60 80' | |
| lint: | |
| name: Code Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Run Code Analysis | |
| run: dotnet build --no-restore --configuration Release /p:TreatWarningsAsErrors=false | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Run Security Audit | |
| run: dotnet list package --vulnerable --include-transitive 2>&1 | tee security-report.txt | |
| - name: Upload Security Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: security-report | |
| path: security-report.txt | |
| retention-days: 7 |