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

Code coverage #11

Merged
merged 2 commits into from
Jul 4, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ jobs:

- name: 🔫 Build All
run: ./build.sh

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
with:
files: tests/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:

- name: 🔫 Build and Pack
run: ./build.sh pack

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
with:
files: tests/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Push to nuget.org
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.CONNECTORS_NUGET_TOKEN }} --skip-duplicate
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ tools

.DS_Store
*.snupkg
/tests/TestArchives/6d23a38c-f064-4ef1-ad89-b942396f53b9/Scratch
coverage.xml
4 changes: 1 addition & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="altcover" Version="8.8.74" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="GraphQL.Client" Version="6.0.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
Expand All @@ -22,13 +23,10 @@
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="JunitXml.TestLogger" Version="3.0.124" />
<PackageVersion Include="Bullseye" Version="5.0.0" />
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
<PackageVersion Include="MongoDB.Driver" Version="2.19.2" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<GlobalPackageReference Include="PolySharp" Version="1.14.1" />
<GlobalPackageReference Include="MinVer" Version="5.0.0" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
Expand Down
7 changes: 7 additions & 0 deletions Speckle.Sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Core.Serialization.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Core.Tests.Integration", "tests\Speckle.Core.Tests.Integration\Speckle.Core.Tests.Integration.csproj", "{4FB41A6D-D139-4111-8115-E3F9F6BEAF24}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B623BD21-5CAA-43F9-A539-1835276C220E}"
ProjectSection(SolutionItems) = preProject
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\ci.yml = .github\workflows\ci.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -91,5 +97,6 @@ Global
{68078752-7C54-471A-9CB6-E8AEF34A9EFF} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116}
{AA1E1E51-49AE-4F71-84B1-938E19695BE0} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{4FB41A6D-D139-4111-8115-E3F9F6BEAF24} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{B623BD21-5CAA-43F9-A539-1835276C220E} = {DA2AED52-58F9-471E-8AD8-102FD36129E3}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void RemoveDirectory(string d)
Glob.Files(".", "**/*.Tests.Unit.csproj").Concat(Glob.Files(".", "**/*.Tests.csproj")),
async file =>
{
await RunAsync("dotnet", $"test {file} -c Release --no-build --verbosity=normal");
await RunAsync("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true");
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


<ItemGroup>
<PackageReference Include="altcover" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
Expand Down
12 changes: 6 additions & 6 deletions tests/Speckle.Core.Serialization.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"version": 2,
"dependencies": {
"net8.0": {
"altcover": {
"type": "Direct",
"requested": "[8.8.74, )",
"resolved": "8.8.74",
"contentHash": "e8RZNE0vZnuBk/gOAWu9K5wm3S7dOrOlZje3PHI9PJUHqvP1cxVJD1eXAAmddFVlixowB7C7/zvC16GnunC2LQ=="
},
"FluentAssertions": {
"type": "Direct",
"requested": "[6.12.0, )",
Expand All @@ -11,12 +17,6 @@
"System.Configuration.ConfigurationManager": "4.4.0"
}
},
"JunitXml.TestLogger": {
"type": "Direct",
"requested": "[3.0.124, )",
"resolved": "3.0.124",
"contentHash": "QTZhSNm/xjj24W1yterf6eABv6KO+Y9jBqpau5RzPehdXTXkZcGQaLf/i50nTl+qnSwpbKkrC+bSyvLRE1ZNAg=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.10.0, )",
Expand Down
16 changes: 8 additions & 8 deletions tests/Speckle.Core.Tests.Integration/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@
"speckle.core.tests.unit": {
"type": "Project",
"dependencies": {
"JunitXml.TestLogger": "[3.0.124, )",
"Microsoft.NET.Test.Sdk": "[17.10.0, )",
"NUnit": "[4.1.0, )",
"NUnit3TestAdapter": "[4.5.0, )",
"Speckle.Core": "[1.0.0, )",
"Speckle.Transports.Disk": "[1.0.0, )"
"Speckle.Transports.Disk": "[1.0.0, )",
"altcover": "[8.8.74, )"
}
},
"speckle.transports.disk": {
Expand All @@ -320,6 +320,12 @@
"Speckle.Core": "[1.0.0, )"
}
},
"altcover": {
"type": "CentralTransitive",
"requested": "[8.8.74, )",
"resolved": "8.8.74",
"contentHash": "e8RZNE0vZnuBk/gOAWu9K5wm3S7dOrOlZje3PHI9PJUHqvP1cxVJD1eXAAmddFVlixowB7C7/zvC16GnunC2LQ=="
},
"GraphQL.Client": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
Expand All @@ -331,12 +337,6 @@
"System.Reactive": "5.0.0"
}
},
"JunitXml.TestLogger": {
"type": "CentralTransitive",
"requested": "[3.0.124, )",
"resolved": "3.0.124",
"contentHash": "QTZhSNm/xjj24W1yterf6eABv6KO+Y9jBqpau5RzPehdXTXkZcGQaLf/i50nTl+qnSwpbKkrC+bSyvLRE1ZNAg=="
},
"Microsoft.CSharp": {
"type": "CentralTransitive",
"requested": "[4.7.0, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="altcover" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
Expand Down
8 changes: 4 additions & 4 deletions tests/Speckle.Core.Tests.Unit/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": 2,
"dependencies": {
"net8.0": {
"JunitXml.TestLogger": {
"altcover": {
"type": "Direct",
"requested": "[3.0.124, )",
"resolved": "3.0.124",
"contentHash": "QTZhSNm/xjj24W1yterf6eABv6KO+Y9jBqpau5RzPehdXTXkZcGQaLf/i50nTl+qnSwpbKkrC+bSyvLRE1ZNAg=="
"requested": "[8.8.74, )",
"resolved": "8.8.74",
"contentHash": "e8RZNE0vZnuBk/gOAWu9K5wm3S7dOrOlZje3PHI9PJUHqvP1cxVJD1eXAAmddFVlixowB7C7/zvC16GnunC2LQ=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="altcover" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
Expand Down
8 changes: 4 additions & 4 deletions tests/Speckle.Objects.Tests.Unit/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": 2,
"dependencies": {
"net8.0": {
"JunitXml.TestLogger": {
"altcover": {
"type": "Direct",
"requested": "[3.0.124, )",
"resolved": "3.0.124",
"contentHash": "QTZhSNm/xjj24W1yterf6eABv6KO+Y9jBqpau5RzPehdXTXkZcGQaLf/i50nTl+qnSwpbKkrC+bSyvLRE1ZNAg=="
"requested": "[8.8.74, )",
"resolved": "8.8.74",
"contentHash": "e8RZNE0vZnuBk/gOAWu9K5wm3S7dOrOlZje3PHI9PJUHqvP1cxVJD1eXAAmddFVlixowB7C7/zvC16GnunC2LQ=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
Expand Down
Loading