Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to Fix Coveralls II #3157

Closed
wants to merge 13 commits into from
19 changes: 16 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,28 @@ jobs:
run: |
dotnet format --verify-no-changes --verbosity diagnostic
- name: Test
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest'
run: |
dotnet test
- name: Test for Coveralls Only
if: matrix.os == 'ubuntu-latest'
run: |
mkdir -p ${GITHUB_WORKSPACE}/CoverageResults
find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov
dotnet test ./tests/Neo.ConsoleService.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/CoverageResults/
dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/CoverageResults/ /p:MergeWith=${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.json
dotnet test ./tests/Neo.UnitTests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/CoverageResults/ /p:MergeWith=${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.json
dotnet test ./tests/Neo.VM.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/CoverageResults/ /p:MergeWith=${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.json
dotnet test ./tests/Neo.Json.UnitTests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/CoverageResults/ /p:MergeWith=${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.json /p:CoverletOutputFormat="opencover"
ls ${GITHUB_WORKSPACE}/CoverageResults/
cat ${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.opencover.xml
- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.2.3
with:
format: opencover
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.net7.0.info
file: ${GITHUB_WORKSPACE}/CoverageResults/coverage.net7.0.opencover.xml

PublishPackage:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
Expand Down
Loading