-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.27 KB
/
build.yaml
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
name: SonarCloud
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and analyze
shell: bash
run: |
export CODACY_API_TOKEN=8SkM1M6hxUP6nG43nSdL
export CODACY_ORGANIZATION_PROVIDER=gh
export CODACY_USERNAME=yogeshboddu
export CODACY_PROJECT_NAME=dotnet-app
dotnet test --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
- name: Generate Test Coverage Report
uses: danielpalme/[email protected]
with:
reports: '**/TestResults/*/coverage.cobertura.xml'
targetdir: coveragereport
reporttypes: 'HtmlInline;Cobertura;MarkdownSummary'
title: 'Coverage Report'
if: success() || failure()
- name: codacy upload
run: |
export CODACY_API_TOKEN=8SkM1M6hxUP6nG43nSdL
export CODACY_ORGANIZATION_PROVIDER=gh
export CODACY_USERNAME=yogeshboddu
export CODACY_PROJECT_NAME=dotnet-app
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coveragereport/Cobertura.xml
if: success() || failure()