Bump the nuget-minor-patch group with 36 updates #73
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
| # CI de PR/push: build + testes da solution completa. | |
| name: .NET | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | |
| - name: Coverage gate | |
| # Ratchet: começa em 45% (cobertura atual ~47%) e deve SUBIR conforme a | |
| # suíte crescer — nunca baixar. Falha o CI se a cobertura de linhas dos | |
| # assemblies Codout.* cair abaixo do piso. | |
| run: | | |
| python3 - <<'EOF' | |
| import glob, sys, xml.etree.ElementTree as ET | |
| THRESHOLD = 45.0 | |
| hit = total = 0 | |
| for f in glob.glob('coverage/**/coverage.cobertura.xml', recursive=True): | |
| for pkg in ET.parse(f).getroot().iter('package'): | |
| if not pkg.get('name', '').startswith(('Codout', 'Softprime')): | |
| continue | |
| for line in pkg.iter('line'): | |
| total += 1 | |
| hit += int(line.get('hits', '0')) > 0 | |
| pct = 100 * hit / total if total else 0.0 | |
| print(f'Cobertura de linhas (Codout.*): {pct:.1f}% (piso: {THRESHOLD}%)') | |
| sys.exit(0 if pct >= THRESHOLD else 1) | |
| EOF | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: coverage | |
| path: ./coverage | |
| retention-days: 14 |