diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7402993..65fbe19e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: paths: - src/** - .github/workflows/** - # save code coverage reports when PRs are merged + # Upload code coverage results when PRs are merged push: branches: - master @@ -62,24 +62,12 @@ jobs: run: dotnet build --no-restore -c Debug - name: Test solution [Debug] working-directory: src - run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=lcov -p:Include=[GraphQL-Parser]* -p:CoverletOutput=../../${{ matrix.os }}.lcov.info - - name: Upload coverage to Coveralls # https://github.com/marketplace/actions/coveralls-github-action + run: dotnet test --no-restore -p:CollectCoverage=true + - name: Upload coverage to codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} - uses: coverallsapp/github-action@v1.1.2 + uses: codecov/codecov-action@v1.2.1 with: - github-token: ${{secrets.GITHUB_TOKEN }} - path-to-lcov: ${{ matrix.os }}.lcov.net5.info # net5 only, ignore netcoreapp3.1 - parallel: true - flag-name: ${{ matrix.os }} - finish: - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@v1.1.2 - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true + files: .coverage/GraphQLParser.Tests/coverage.net5.opencover.xml buildcheck: needs: diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..6535dc36 --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + opencover + $(MSBuildThisFileDirectory)../.coverage/$(AssemblyName)/ + + + diff --git a/src/GraphQLParser.sln b/src/GraphQLParser.sln index 58f41669..345681ed 100644 --- a/src/GraphQLParser.sln +++ b/src/GraphQLParser.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\.editorconfig = ..\.editorconfig ..\.gitignore = ..\.gitignore Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets ..\LICENSE.md = ..\LICENSE.md ..\assets\logo.64x64.png = ..\assets\logo.64x64.png ..\README.md = ..\README.md