From 5af6304931c0a6302651ece95c732c537870680b Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Thu, 28 Nov 2019 21:57:26 +0000 Subject: [PATCH] minor nightly workflow update --- .github/workflows/nightlybuild.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index fea6aba3..fe8d53ee 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -25,12 +25,26 @@ jobs: - name: Build Code run: dotnet build TransactionProcessor.sln --configuration Release - + - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessor.BusinessLogic.Tests\TransactionProcessor.BusinessLogic.Tests.csproj" - dotnet test "TransactionProcessor.Tests\TransactionProcessor.Tests.csproj" + dotnet test "TransactionProcessor.BusinessLogic.Tests\TransactionProcessor.BusinessLogic.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet test "TransactionProcessor.Tests\TransactionProcessor.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + + - name: Setup Node.js for use with actions + uses: actions/setup-node@v1.1.0 + + - name: Combine Coverage + run: | + npm i lcov-result-merger + ./node_modules/lcov-result-merger/bin/lcov-result-merger.js '*.info' 'lcov.info' + + - name: Upload Code Coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: lcov.info - name: Build Docker Image run: docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest