Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<CoverletOutput>$(MSBuildThisFileDirectory)../.coverage/$(AssemblyName)/</CoverletOutput>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions src/GraphQLParser.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down