Skip to content

Commit

Permalink
Merge branch 'feature/e2e-test' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jun 19, 2023
2 parents cfdcb9d + f68ada1 commit bc49423
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: build
on:
workflow_dispatch:
push:
branches-ignore:
- "feature/e2e-test"
paths-ignore:
- "doc/**"
- "**.md"
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test

on:
workflow_dispatch:
push:
paths-ignore:
- "doc/**"
- "**.md"

jobs:
sora_python_sdk_e2e_test:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
steps:
- uses: sksat/setup-rye@v0.1.0
- uses: actions/checkout@v3
- run: |
sudo apt-get update
sudo apt-get -y install libva-dev libdrm-dev
- run: rye sync
- run: rye run python run.py
- run: rye run python -m pytest tests/test_recvonly.py
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ dev-dependencies = [
"build~=0.10.0",
"wheel~=0.40.0",
"auditwheel~=5.4.0",
"pytest~=7.3.2",
]
4 changes: 4 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
-e file:.
auditwheel==5.4.0
build==0.10.0
exceptiongroup==1.1.1
iniconfig==2.0.0
nanobind==1.4.0
packaging==23.1
pluggy==1.0.0
pyelftools==0.29
pyproject-hooks==1.0.0
pytest==7.3.2
tomli==2.0.1
wheel==0.40.0
# The following packages are considered to be unsafe in a requirements file:
Expand Down
25 changes: 25 additions & 0 deletions tests/test_recvonly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import os
import time

from sora_sdk import Sora


def on_disconnect(error_code, message_abc: str):
print(f'on_disconnect: error_code: {error_code}, message: {message_abc}')


# @pytest.mark.timeout(10)
def test_sendonly():
sora = Sora()

conn = sora.create_connection(
signaling_url=os.environ.get("TEST_SIGNALING_URL"),
role="recvonly",
channel_id=os.environ.get("TEST_CHANNEL_ID_PREFIX") + "sora-python-sdk-test",
metadata={"access_token": os.environ.get("TEST_SECRET_KEY")}
)

conn.on_disconnect = on_disconnect
conn.connect()
time.sleep(3)
conn.disconnect()

0 comments on commit bc49423

Please sign in to comment.