Skip to content

Commit

Permalink
e2e-test を実行するように設定
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoho committed Jan 4, 2025
1 parent 02e6d5d commit 358cd51
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
paths-ignore:
- "**.md"
branches:
- feature/fix-memoryleak2
schedule:
# UTC の 01:00 は JST だと 10:00 。
# 1-5 で 月曜日から金曜日
Expand All @@ -31,6 +33,7 @@ jobs:
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event_name == 'schedule'
}}
steps:
Expand Down Expand Up @@ -73,6 +76,7 @@ jobs:
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event_name == 'schedule'
}}
steps:
Expand Down Expand Up @@ -106,6 +110,7 @@ jobs:
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
github.event_name == 'schedule'
}}
steps:
Expand Down
32 changes: 32 additions & 0 deletions tests/test_simple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sys
import time
import uuid

from client import SoraClient, SoraRole
from sora_sdk import (
Sora,
)


def test_simple_class(setup):
signaling_urls = setup.get("signaling_urls")
channel_id_prefix = setup.get("channel_id_prefix")
metadata = setup.get("metadata")

channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"

recvonly = SoraClient(
signaling_urls,
SoraRole.SENDONLY,
channel_id,
audio=True,
video=True,
metadata=metadata,
)
recvonly.connect()

time.sleep(5)

recvonly.disconnect()

print("finished")

0 comments on commit 358cd51

Please sign in to comment.