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

Coveralls and packages update #1046

Merged
merged 16 commits into from
May 22, 2024
44 changes: 19 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:

env:
DOTNET_VERSION: 8.0.x
DOTNET_TEST_PARAMETERS: --no-build /p:CollectCoverage=true -l "console;verbosity=detailed"
COVERLET_EXCLUDE_COVERAGE: /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
COVERLET_OUTPUT: /p:CoverletOutput=${{ github.workspace }}/coverage-join/
COVERLET_MERGE_WITH: /p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json

jobs:

Expand Down Expand Up @@ -51,43 +55,33 @@ jobs:
- name: Test Neo.Compiler.CSharp.UnitTests
run: |
dotnet test ./tests/Neo.Compiler.CSharp.UnitTests \
--no-build \
/p:CollectCoverage=true \
/p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
/p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
${{ env.DOTNET_TEST_PARAMETERS }} \
${{ env.COVERLET_OUTPUT }} \
${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Framework.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \
--no-build \
-e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
-l "console;verbosity=detailed" \
/p:CollectCoverage=true \
/p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
/p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
/p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
${{ env.DOTNET_TEST_PARAMETERS }} \
${{ env.COVERLET_OUTPUT }} \
${{ env.COVERLET_MERGE_WITH }} \
${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Testing.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Testing.UnitTests \
--no-build \
-e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
-l "console;verbosity=detailed" \
/p:CollectCoverage=true \
/p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
/p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
/p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
${{ env.DOTNET_TEST_PARAMETERS }} \
${{ env.COVERLET_OUTPUT }} \
${{ env.COVERLET_MERGE_WITH }} \
${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Template.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Template.UnitTests \
--no-build \
-e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
-l "console;verbosity=detailed" \
/p:CollectCoverage=true \
${{ env.DOTNET_TEST_PARAMETERS }} \
${{ env.COVERLET_MERGE_WITH }} \
${{ env.COVERLET_EXCLUDE_COVERAGE }} \
/p:CoverletOutput=${{ github.workspace }}/coverage/lcov \
/p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
/p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" \
/p:CoverletOutputFormat=lcov
- name: Coveralls
uses: coverallsapp/github-action@v2.2.3
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

<ItemGroup>
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="ReportGenerator.Core" Version="5.2.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="ReportGenerator.Core" Version="5.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading