Skip to content

Commit 70c2112

Browse files
Mazyodclaude
andcommitted
Update test server to HTTPS and document OpenUPM publishing
- Update integration test host from phoenix-sharp.level3.io:3080 to phoenix-sharp.level3.io with wss:// and https:// protocols - Document OpenUPM release flow and Unity package in CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da0e198 commit 70c2112

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

CLAUDE.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,20 @@ dotnet format
3232
- **Phoenix/** - Main library (netstandard2.0, C# 9.0, nullable enabled)
3333
- **PhoenixTests/** - NUnit tests (net9.0)
3434
- **Reference/** - Reference implementations for Unity (BestHTTP websocket, coroutine-based delayed executor)
35+
- **src/PhoenixSharp.Unity/** - Unity package project (published to OpenUPM as `io.level3.phoenixsharp`)
3536

36-
## NuGet Package
37+
## Publishing
3738

38-
The library is published to NuGet.org as `PhoenixSharp`.
39+
The library is distributed via two channels: **NuGet** (`PhoenixSharp`) and **OpenUPM** (`io.level3.phoenixsharp`). Both are published from a single trigger.
3940

40-
**Publishing:** Handled automatically via GitHub Actions trusted publishing. To release:
41-
1. Create a GitHub release with a version tag (e.g., `v1.0.3`)
42-
2. The `publish.yml` workflow builds and pushes to NuGet.org
41+
**To release:**
42+
1. Create a GitHub release with a version tag (e.g., `v1.2.3`)
43+
2. The `publish.yml` workflow:
44+
- Updates the Unity `package.json` version at `src/PhoenixSharp.Unity/Assets/Plugins/PhoenixSharp/package.json`
45+
- Updates the README manifest example
46+
- Commits and pushes the version bump back to `master`
47+
- Builds and pushes the NuGet package via trusted publishing (OIDC)
48+
3. OpenUPM automatically detects the new git tag and publishes the Unity package from the `package.json`
4349

4450
**Version management:** Version is set via git tag at release time. The `<Version>` in `Phoenix.csproj` is a fallback for local builds.
4551

@@ -94,7 +100,7 @@ The library decouples from specific implementations via interfaces:
94100

95101
Integration tests require a running Phoenix server. The test host is configured in `IntegrationTests.cs`:
96102
```csharp
97-
private const string Host = "phoenix-sharp.level3.io:3080";
103+
private const string Host = "phoenix-sharp.level3.io";
98104
```
99105

100106
Server source: https://github.com/Mazyod/phoenix-integration-tester

PhoenixTests/IntegrationTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void Log(LogLevel level, string source, string message)
3131
/// including socket connections, channel operations, presence tracking, and the async API.
3232
///
3333
/// <para><b>Test Server:</b></para>
34-
/// Tests connect to a Phoenix server at <c>phoenix-sharp.level3.io:3080</c>.
34+
/// Tests connect to a Phoenix server at <c>phoenix-sharp.level3.io</c>.
3535
/// The server source code is available at: https://github.com/Mazyod/phoenix-integration-tester
3636
///
3737
/// <para><b>Prerequisites:</b></para>
@@ -55,7 +55,7 @@ public class IntegrationTests
5555
[SetUp]
5656
public void Init()
5757
{
58-
var address = $"http://{Host}/api/health-check";
58+
var address = $"https://{Host}/api/health-check";
5959

6060
// Verify server is available before running tests
6161
using HttpClient client = new();
@@ -72,7 +72,7 @@ public void Init()
7272
/// <summary>
7373
/// The Phoenix server host used for integration testing.
7474
/// </summary>
75-
private const string Host = "phoenix-sharp.level3.io:3080";
75+
private const string Host = "phoenix-sharp.level3.io";
7676

7777
/// <summary>
7878
/// Default channel parameters used for authentication.
@@ -120,7 +120,7 @@ void OnCloseCallback(ushort code, string message)
120120
onCloseData.Add(message);
121121
}
122122

123-
var socketAddress = $"ws://{Host}/socket";
123+
var socketAddress = $"wss://{Host}/socket";
124124
var socketFactory = new DotNetWebSocketFactory();
125125
var socket = new Socket(
126126
socketAddress,
@@ -361,7 +361,7 @@ void OnClosedCallback(ushort code, string reason)
361361
onOpenCount--;
362362
}
363363

364-
var socketAddress = $"ws://{Host}/socket";
364+
var socketAddress = $"wss://{Host}/socket";
365365
var socketFactory = new DotNetWebSocketFactory();
366366
var socket = new Socket(
367367
socketAddress,
@@ -462,7 +462,7 @@ void OnOpenCallback()
462462
onOpenCount++;
463463
}
464464

465-
var socketAddress = $"ws://{Host}/socket";
465+
var socketAddress = $"wss://{Host}/socket";
466466
var socketFactory = new DotNetWebSocketFactory();
467467
var socket = new Socket(
468468
socketAddress,
@@ -562,7 +562,7 @@ public async Task AsyncApiIntegrationTest()
562562
{
563563
// ===== SECTION: Socket Setup and ConnectAsync =====
564564

565-
var socketAddress = $"ws://{Host}/socket";
565+
var socketAddress = $"wss://{Host}/socket";
566566
var socketFactory = new DotNetWebSocketFactory();
567567
var socket = new Socket(
568568
socketAddress,
@@ -747,7 +747,7 @@ public async Task PresenceAsyncApiIntegrationTest()
747747
{
748748
// ===== SECTION: Socket Setup =====
749749

750-
var socketAddress = $"ws://{Host}/socket";
750+
var socketAddress = $"wss://{Host}/socket";
751751
var socketFactory = new DotNetWebSocketFactory();
752752
var socket = new Socket(
753753
socketAddress,

0 commit comments

Comments
 (0)