diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e57334d628..cd7ee9f793 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,6 @@ on: env: DOTNET_VERSION: 9.0.x - COVERLET_EXCLUDE_COVERAGE: -p:Exclude="[Neo.UnitTests]*" jobs: @@ -39,7 +38,7 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build (Everything) - run: dotnet build -p:GITHUB_ACTIONS=true + run: dotnet build --disable-parallel -p:GITHUB_ACTIONS=true - name: Install dependencies run: | @@ -70,53 +69,44 @@ jobs: run: | brew install leveldb brew install gperftools - dotnet build -p:GITHUB_ACTIONS=true + dotnet build --disable-parallel -p:GITHUB_ACTIONS=true dotnet test --no-build -p:GITHUB_ACTIONS=true - name: Test (windows) if: matrix.os == 'windows-latest' run: | - dotnet build -p:GITHUB_ACTIONS=true + dotnet build --disable-parallel -p:GITHUB_ACTIONS=true dotnet test --no-build -p:GITHUB_ACTIONS=true - name: Test for coverall if: matrix.os == 'ubuntu-latest' run: | sudo apt-get --assume-yes install libleveldb-dev librocksdb-dev - - dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests --output ./bin/tests/Neo.Cryptography.BLS12_381.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.ConsoleService.Tests --output ./bin/tests/Neo.ConsoleService.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.UnitTests --output ./bin/tests/Neo.UnitTests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.VM.Tests --output ./bin/tests/Neo.VM.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Json.UnitTests --output ./bin/tests/Neo.Json.UnitTests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Extensions.Tests --output ./bin/tests/Neo.Extensions.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - - # Plugins - dotnet test ./tests/Neo.Cryptography.MPTTrie.Tests --output ./bin/tests/Neo.Cryptography.MPTTrie.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Network.RPC.Tests --output ./bin/tests/Neo.Network.RPC.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Plugins.OracleService.Tests --output ./bin/tests/Neo.Plugins.OracleService.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Plugins.RpcServer.Tests --output ./bin/tests/Neo.Plugins.RpcServer.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Plugins.Storage.Tests --output ./bin/tests/Neo.Plugins.Storage.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true - dotnet test ./tests/Neo.Plugins.ApplicationLogs.Tests --output ./bin/tests/Neo.Plugins.ApplicationLogs.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true + dotnet build --disable-parallel -p:GITHUB_ACTIONS=true + dotnet test --no-build -p:GITHUB_ACTIONS=true -p:Exclude="[Neo.UnitTests]*" - name: Coveralls if: matrix.os == 'ubuntu-latest' - uses: coverallsapp/github-action@v2.3.0 + uses: coverallsapp/github-action@v2.3.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} + debug: false + measure: true + allow-empty: true + format: lcov files: - ${{ github.workspace }}/tests/Neo.Cryptography.BLS12_381.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.ConsoleService.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.UnitTests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.VM.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Json.UnitTests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Cryptography.MPTTrie.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Network.RPC.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Plugins.OracleService.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Plugins.RpcServer.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Plugins.Storage.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Plugins.ApplicationLogs.Tests/TestResults/coverage.info - ${{ github.workspace }}/tests/Neo.Extensions.Tests/TestResults/coverage.info + ${{ github.workspace }}/TestResults/Neo.UnitTests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Cryptography.BLS12_381.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.ConsoleService.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.VM.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Json.UnitTests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Cryptography.MPTTrie.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Network.RPC.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Plugins.OracleService.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Plugins.RpcServer.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Plugins.Storage.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Plugins.ApplicationLogs.Tests/coverage.info + ${{ github.workspace }}/TestResults/Neo.Extensions.Tests/coverage.info PublishPackage: if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/') diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 865951f218..0f14aa3cd9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -26,6 +26,7 @@ 4 latest ../../bin/$(PackageId) + true diff --git a/src/Plugins/Directory.Build.props b/src/Plugins/Directory.Build.props index ecd9a2735f..f5eaeb6226 100644 --- a/src/Plugins/Directory.Build.props +++ b/src/Plugins/Directory.Build.props @@ -1,8 +1,12 @@ - + + + true + + diff --git a/src/Plugins/LevelDBStore/LevelDBStore.csproj b/src/Plugins/LevelDBStore/LevelDBStore.csproj index 7021dc8f2b..b28a51a520 100644 --- a/src/Plugins/LevelDBStore/LevelDBStore.csproj +++ b/src/Plugins/LevelDBStore/LevelDBStore.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index d7e75c2da1..da82650abe 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -10,21 +10,22 @@ false true true - TestResults/ + ../../TestResults/$(MSBuildProjectName)/ lcov true 4 latest + ../../bin/tests/$(MSBuildProjectName) + true + true - - all - runtime; build; native; contentfiles; analyzers; buildtransitive + + all - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all diff --git a/tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj b/tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj index c46768d54f..cc88e77245 100644 --- a/tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj +++ b/tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj @@ -1,10 +1,9 @@ - + true Exe net9.0 - neo_cli.Tests diff --git a/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj b/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj index c21aa09015..e5f4aab71a 100644 --- a/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj +++ b/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj @@ -1,10 +1,9 @@ - + true Exe net9.0 - Neo.Cryptography.MPT.Tests diff --git a/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj b/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj index 15964616e1..5122e5c267 100644 --- a/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj +++ b/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj @@ -1,10 +1,9 @@ - + true Exe net9.0 - Neo.Network.RPC.Tests diff --git a/tests/Neo.Plugins.ApplicationLogs.Tests/Neo.Plugins.ApplicationLogs.Tests.csproj b/tests/Neo.Plugins.ApplicationLogs.Tests/Neo.Plugins.ApplicationLogs.Tests.csproj index 8e3798d475..b8a51974ef 100644 --- a/tests/Neo.Plugins.ApplicationLogs.Tests/Neo.Plugins.ApplicationLogs.Tests.csproj +++ b/tests/Neo.Plugins.ApplicationLogs.Tests/Neo.Plugins.ApplicationLogs.Tests.csproj @@ -1,8 +1,7 @@ - + net9.0 - Neo.Plugins.ApplicationsLogs.Tests diff --git a/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj b/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj index 0de1f49fb7..6706c2b10b 100644 --- a/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj +++ b/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj @@ -1,11 +1,9 @@ - + true Exe net9.0 - OracleService.Tests - Neo.Plugins diff --git a/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj b/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj index ea9389738c..4e1f26e024 100644 --- a/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj +++ b/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj @@ -1,11 +1,9 @@ - + true Exe net9.0 - Neo.Plugins.RpcServer.Tests - Neo.Plugins.RpcServer.Tests true diff --git a/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj b/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj index f6430d38c2..c5ad9f1455 100644 --- a/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj +++ b/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj @@ -1,10 +1,9 @@ - + true Exe net9.0 - Neo.Plugins.Storage.Tests diff --git a/tests/Neo.VM.Tests/Neo.VM.Tests.csproj b/tests/Neo.VM.Tests/Neo.VM.Tests.csproj index 843ce5baf5..f5f630dec3 100644 --- a/tests/Neo.VM.Tests/Neo.VM.Tests.csproj +++ b/tests/Neo.VM.Tests/Neo.VM.Tests.csproj @@ -1,10 +1,9 @@ - + true Exe net9.0 - Neo.Test true