Skip to content

SIANXSVC-1214: Use lcov for CodeClimate reports #154

SIANXSVC-1214: Use lcov for CodeClimate reports

SIANXSVC-1214: Use lcov for CodeClimate reports #154

Workflow file for this run

name: "Run tests"
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Run tests (${{ matrix.dotnet-version }})
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
strategy:
matrix:
dotnet-version: ["6.0.x", "8.0.x"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "${{ matrix.dotnet-version }}"
- run: dotnet restore
- name: Run tests with coverage
run: >
dotnet test
--no-restore
--collect:"XPlat Code Coverage"
/p:CoverletOutputFormat=lcov
--logger trx
--results-directory "test-results"
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByFile="**/*.g.cs"
- name: Upload coverage to Codeclimate
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: "test-results/**/coverage.info:lcov"