Skip to content

fix: Update CI/CD workflow to skip integration tests and adjust Docke… #27

fix: Update CI/CD workflow to skip integration tests and adjust Docke…

fix: Update CI/CD workflow to skip integration tests and adjust Docke… #27

Workflow file for this run

name: Code Coverage Report
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
coverage:
name: Generate Coverage Report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore src/EChamado/EChamado.sln
- name: Build
run: dotnet build src/EChamado/EChamado.sln --configuration Release --no-restore
- name: Test with Coverage
run: |
dotnet test src/EChamado/EChamado.sln --configuration Release \
--no-build \
--verbosity normal \
/p:CollectCoverage=true \
/p:CoverletOutputFormat=cobertura \
/p:CoverletOutput=./TestResults/
- name: Generate Coverage Report
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.10
with:
reports: '**/coverage.cobertura.xml'
targetdir: 'coveragereport'
reporttypes: 'Html;Badges'
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coveragereport
- name: Add Coverage Comment to PR
if: github.event_name == 'pull_request'
uses: 5monkeys/cobertura-action@master
with:
path: '**/coverage.cobertura.xml'
minimum_coverage: 70
fail_below_threshold: true