From cf5e68359e0e6c427fb84ddf02f6e3a6941e8b24 Mon Sep 17 00:00:00 2001 From: David Federman Date: Tue, 9 Aug 2022 21:42:26 -0700 Subject: [PATCH] Add code coverage to GitHub actions --- .github/workflows/ci.yml | 4 ++++ .github/workflows/pr.yml | 4 ++++ Directory.Build.props | 3 +++ 3 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2d5543..13af085 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,10 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --configuration Release --no-build --logger trx --results-directory TestResults --collect:"XPlat Code Coverage" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + directory: ./TestResults - name: Upload test results uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 535f683..2f0639d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,6 +20,10 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --configuration Release --no-build --logger trx --results-directory TestResults --collect:"XPlat Code Coverage" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + directory: ./TestResults - name: Upload test results uses: actions/upload-artifact@v3 with: diff --git a/Directory.Build.props b/Directory.Build.props index 3b86ecf..3ae0869 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -23,6 +23,9 @@ Enable + + + Full