diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 69da395b..09fe7320 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,8 +19,12 @@ jobs:
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- restore-keys: |
- ${{ runner.os }}-nuget-
- name: 🔫 Build All
run: ./build.sh
+
+ - name: Upload coverage reports to Codecov with GitHub Action
+ uses: codecov/codecov-action@v4
+ with:
+ files: tests/**/coverage.xml
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 77c4e123..3570361b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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
+ 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
diff --git a/.gitignore b/.gitignore
index d6a5a1d1..6e3d7b2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,4 +18,4 @@ tools
.DS_Store
*.snupkg
-/tests/TestArchives/6d23a38c-f064-4ef1-ad89-b942396f53b9/Scratch
+coverage.xml
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6be77c03..5a2cafec 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,5 +1,6 @@
+
@@ -14,16 +15,15 @@
+
-
-
+
+
-
-
@@ -32,4 +32,4 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index e4aa0173..7de6c40f 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,11 @@
[](https://twitter.com/SpeckleSystems) [](https://discourse.speckle.works) [](https://speckle.systems) [](https://speckle.guide/dev/)
+[](https://codecov.io/gh/specklesystems/speckle-sharp-sdk)
+
## **Disclaimer**
-This is an early alpha release, not meant for use in production! We're working to stabilise the 2.0 API, and until then there will be breaking changes. You have been warned!
+This is an early alpha release, not meant for use in production! We're working to stabilise the 3.0 API, and until then there will be breaking changes. You have been warned!
## Introduction
diff --git a/Speckle.Sdk.sln b/Speckle.Sdk.sln
index 202d1e1a..fc72c591 100644
--- a/Speckle.Sdk.sln
+++ b/Speckle.Sdk.sln
@@ -32,6 +32,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Transports.MongoDB"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Core.Serialization.Tests", "tests\Speckle.Core.Serialization.Tests\Speckle.Core.Serialization.Tests.csproj", "{AA1E1E51-49AE-4F71-84B1-938E19695BE0}"
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
@@ -74,6 +82,10 @@ Global
{AA1E1E51-49AE-4F71-84B1-938E19695BE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA1E1E51-49AE-4F71-84B1-938E19695BE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA1E1E51-49AE-4F71-84B1-938E19695BE0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A413E196-3696-4F48-B635-04B5F76BF9C9} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116}
@@ -84,5 +96,7 @@ Global
{9B8DDEB5-37C7-49B5-984D-C65DE5FCB7B7} = {58D37DA9-F948-48CA-9A73-F5BBBD533DBF}
{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
diff --git a/build/Program.cs b/build/Program.cs
index fdbb0e41..e276da07 100644
--- a/build/Program.cs
+++ b/build/Program.cs
@@ -43,19 +43,22 @@ void RemoveDirectory(string d)
Target(RESTORE, () => RunAsync("dotnet", "restore Speckle.Sdk.sln --locked-mode"));
-Target(BUILD, DependsOn(RESTORE), () => RunAsync("dotnet", $"build Speckle.Sdk.sln -c Release --no-restore"));
+Target(BUILD, DependsOn(RESTORE), () => RunAsync("dotnet", "build Speckle.Sdk.sln -c Release --no-restore"));
Target(
TEST,
DependsOn(BUILD),
- Glob.Files(".", "**/*.Tests.Unit.csproj"),
+ 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 /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage"
+ );
}
);
-Target(PACK, DependsOn(BUILD), () => RunAsync("dotnet", "pack Speckle.Sdk.sln -c Release -o output --no-build"));
+Target(PACK, DependsOn(TEST), () => RunAsync("dotnet", "pack Speckle.Sdk.sln -c Release -o output --no-build"));
Target("default", DependsOn(FORMAT, TEST), () => Console.WriteLine("Done!"));
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 00000000..8221fde1
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,13 @@
+coverage:
+ status:
+ project:
+ default:
+ informational: true
+ target: auto
+ threshold: 1%
+ base: auto
+ patch:
+ default:
+ informational: true
+github_checks:
+ annotations: false
\ No newline at end of file
diff --git a/src/Speckle.Core/Api/Exceptions.cs b/src/Speckle.Core/Api/Exceptions.cs
index 7d10bd99..f100fd22 100644
--- a/src/Speckle.Core/Api/Exceptions.cs
+++ b/src/Speckle.Core/Api/Exceptions.cs
@@ -9,50 +9,55 @@ namespace Speckle.Core.Api;
///
/// Base class for GraphQL API exceptions
///
-public class SpeckleGraphQLException : SpeckleException
+public class SpeckleGraphQLException : SpeckleGraphQLException
{
- private readonly GraphQLRequest _request;
- public GraphQLResponse? Response { get; }
-
- public SpeckleGraphQLException(string message, GraphQLRequest request, GraphQLResponse? response)
- : base(message)
- {
- _request = request;
- Response = response;
- }
+ public new GraphQLResponse? Response => (GraphQLResponse?)base.Response;
- public SpeckleGraphQLException(string message, Exception inner, GraphQLRequest request, GraphQLResponse? response)
- : this(message, inner)
- {
- _request = request;
- Response = response;
- }
+ public SpeckleGraphQLException(
+ string message,
+ GraphQLRequest request,
+ GraphQLResponse? response,
+ Exception? innerException = null
+ )
+ : base(message, request, response, innerException) { }
public SpeckleGraphQLException() { }
- public SpeckleGraphQLException(string message)
+ public SpeckleGraphQLException(string? message)
: base(message) { }
- public SpeckleGraphQLException(string message, Exception innerException)
+ public SpeckleGraphQLException(string? message, Exception? innerException)
: base(message, innerException) { }
+}
+
+public class SpeckleGraphQLException : SpeckleException
+{
+ private readonly GraphQLRequest _request;
+ public IGraphQLResponse? Response { get; }
public IEnumerable ErrorMessages =>
Response?.Errors != null ? Response.Errors.Select(e => e.Message) : Enumerable.Empty();
public IDictionary? Extensions => Response?.Extensions;
-}
-public class SpeckleGraphQLException : SpeckleGraphQLException