capture test metrics #81
This file contains 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
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" | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) |