diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index a13daa35..149a9897 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -4,9 +4,7 @@ "tools": { "csharpier": { "version": "0.28.0", - "commands": [ - "dotnet-csharpier" - ] + "commands": ["dotnet-csharpier"] } } -} \ No newline at end of file +} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 12553b13..86f67a40 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,6 +22,22 @@ jobs: run: dotnet tool restore - name: Check formatting run: dotnet csharpier --check . + coverage: + name: Check code coverage + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + with: + dotnet-version: 8.0.204 + - name: Run tests + run: dotnet test -c Debug --collect:"XPlat Code Coverage" --settings coverlet.runsettings ArchUnitNETTests/ + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} run-tests: name: Run tests strategy: diff --git a/ArchUnitNETTests/ArchUnitNETTests.csproj b/ArchUnitNETTests/ArchUnitNETTests.csproj index 7acad077..953ec859 100644 --- a/ArchUnitNETTests/ArchUnitNETTests.csproj +++ b/ArchUnitNETTests/ArchUnitNETTests.csproj @@ -1,40 +1,44 @@ - + - - net8.0 - latest - TNG Technology Consulting GmbH - true - + + net8.0 + latest + TNG Technology Consulting GmbH + true + - - - - + + + + - - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + - - - Never - - - PreserveNewest - - + + + Never + + + PreserveNewest + + - - - + + + - - - Dependencies\cpplib\CppDllTest.dll - - + + + Dependencies\cpplib\CppDllTest.dll + + - + \ No newline at end of file diff --git a/coverlet.runsettings b/coverlet.runsettings new file mode 100644 index 00000000..327c2a64 --- /dev/null +++ b/coverlet.runsettings @@ -0,0 +1,13 @@ + + + + + + + cobertura + [ArchUnitNET]* + + + + + \ No newline at end of file