-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (37 loc) · 1.31 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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/${{ github.ref_name }}/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.event_name == 'push'