Skip to content

Use a local NuGet source for the release workflow tests #211

Use a local NuGet source for the release workflow tests

Use a local NuGet source for the release workflow tests #211

Workflow file for this run

name: coverage
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build
- name: Generate Coverage Reports
run: dotnet test --collect:"XPlat Code Coverage" -p:RunSettingsFilePath=${{ github.workspace }}/build/Coverlet.runsettings
shell: bash
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
files: tests/*/TestResults/*/coverage.cobertura.xml
format: cobertura
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.8
with:
reports: tests/*/TestResults/*/coverage.cobertura.xml
targetdir: coveragereport
reporttypes: Html;Badges
license: ${{ secrets.REPORT_GENERATOR_LICENSE }}
- name: Sync Coverage Report to S3
run: aws s3 sync ./coveragereport s3://${{ secrets.AWS_S3_BUCKET }}/csharp/main/coverage --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'