Skip to content
Closed
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local" value="$(pwd)/../../nupkgs" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="local">
<package pattern="SpacetimeDB.*" />
</packageSource>
</packageSourceMapping>
</configuration>
EOF
- name: Run smoketests
# Note: clear_database and replication only work in private
run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/csharp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.'
Expand Down
10 changes: 1 addition & 9 deletions smoketests/tests/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading