diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fae3383572..5efa404f472 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,25 @@ jobs: if: runner.os == 'Windows' - name: Install psycopg2 run: python -m pip install psycopg2-binary + - name: Build and pack C# SDK + run: | + cd sdks/csharp + dotnet build SpacetimeDB.ClientSDK.csproj -c Release + dotnet pack SpacetimeDB.ClientSDK.csproj -c Release -o ../../nupkgs + cat > NuGet.config << EOF + + + + + + + + + + + + + EOF - name: Run smoketests # Note: clear_database and replication only work in private run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index c6721481fef..1e1671881e6 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -38,6 +38,7 @@ jobs: # if they're not pushed to NuGet. # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. cd sdks/csharp + dotnet pack SpacetimeDB.ClientSDK.csproj -o ../../nupkgs ./tools~/write-nuget-config.sh ../.. - name: Run .NET tests @@ -126,6 +127,9 @@ jobs: - name: Run regression tests run: | + cd sdks/csharp + dotnet build + cd ../.. bash sdks/csharp/tools~/run-regression-tests.sh tools/check-diff.sh sdks/csharp/examples~/regression-tests || { echo 'Error: Bindings are dirty. Please run `sdks/csharp/tools~/gen-regression-tests.sh`.' diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 4b67578f559..838ddad2eb7 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -45,15 +45,7 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): - """Add a local NuGet package to a .NET project""" - sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) - # Is the source already added? - if package_name in sources: - run_cmd("dotnet", "nuget", "remove", "source", package_name, cwd=project_path, capture_stderr=True) - run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", package_name, cwd=project_path, - capture_stderr=True) - run_cmd("dotnet", "add", "package", package_name, cwd=project_path, capture_stderr=True) - + """Skipping adding a local NuGet package to a .NET project""" class BaseQuickstart(Smoketest): AUTOPUBLISH = False