Skip to content

Commit 6db5ce3

Browse files
committed
Merge pull request #141 from GetStream/otel-rtc
1 parent 00d842e commit 6db5ce3

File tree

133 files changed

+37893
-4946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+37893
-4946
lines changed

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
STREAM_API_KEY=892s22ypvt6m
2-
STREAM_API_SECRET=5cssrefv55rs3cnkk38kfjam2k7c2ykwn4h79dqh66ym89gm65cxy4h9jx4cypd6
1+
STREAM_API_KEY=your-stream-api-key
2+
STREAM_API_SECRET=your-stream-api-secret
33
STREAM_BASE_URL=http://127.0.0.1:3030
44
OPENAI_API_KEY=sk-your-openai-api-key
5+
CARTESIA_API_KEY=your-cartesia-api-key

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ on:
77
pull_request:
88
branches:
99
- main
10+
- webrtc
1011

1112
jobs:
1213
test:
1314
name: Tests
14-
environment: ci
15+
environment: feeds-v3-ci
1516
runs-on: ubuntu-latest
1617
continue-on-error: true
1718
strategy:
1819
fail-fast: false
1920
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2122
steps:
2223
- name: Check out repo
2324
uses: actions/checkout@v4
24-
- uses: chartboost/ruff-action@v1
25+
- uses: astral-sh/ruff-action@v3
2526
continue-on-error: false
2627
- name: Install uv and set the python version
2728
uses: astral-sh/setup-uv@v5
@@ -34,4 +35,9 @@ jobs:
3435
STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }}
3536
STREAM_API_KEY: ${{ vars.STREAM_API_KEY }}
3637
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
37-
run: uv run pytest tests/ getstream/
38+
run: |
39+
if [ "${{ matrix.python-version }}" = "3.9" ]; then
40+
uv run pytest tests/
41+
else
42+
uv run pytest tests/ getstream/
43+
fi

.github/workflows/release-v2.yml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
name: ReleaseV2 (TestPyPI)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
python-version:
7+
description: "Python version to use"
8+
default: "3.12"
9+
required: false
10+
11+
permissions:
12+
contents: read
13+
id-token: write # required for OIDC publishing to TestPyPI via trusted publisher
14+
15+
jobs:
16+
build-core:
17+
name: Build & Test Core SDK
18+
runs-on: ubuntu-latest
19+
outputs:
20+
version: ${{ steps.get_version.outputs.version }}
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python ${{ github.event.inputs.python-version || '3.12' }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ github.event.inputs.python-version || '3.12' }}
29+
30+
- name: Install build tooling (uv & test deps)
31+
run: |
32+
python -m pip install --upgrade pip
33+
# Install uv (once) using pip, then use uv for the rest
34+
python -m pip install uv
35+
uv pip install pytest pytest-asyncio coverage[toml]
36+
37+
- name: Sync environment & install dev extras
38+
run: |
39+
uv sync --dev --all-packages --all-groups --all-extras
40+
41+
- name: Build core distributions
42+
run: |
43+
uv build -o dist
44+
45+
- name: Run tests with coverage (core only)
46+
env:
47+
PYTHONPATH: "${{ github.workspace }}"
48+
run: |
49+
uv run pytest --cov=getstream --cov-report=xml --ignore=getstream/plugins
50+
51+
- name: Upload coverage artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: core-coverage-xml
55+
path: coverage.xml
56+
57+
- name: Extract package version
58+
id: get_version
59+
run: |
60+
python - <<'PY'
61+
import tomllib, pathlib, os
62+
meta = tomllib.loads(pathlib.Path('pyproject.toml').read_text())
63+
version = meta['project']['version']
64+
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
65+
fh.write(f'version={version}\n')
66+
PY
67+
68+
- name: Publish core to TestPyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
repository-url: https://test.pypi.org/legacy/
72+
packages-dir: dist
73+
env:
74+
name: testpypi
75+
76+
test-core-index:
77+
name: Verify Core from TestPyPI
78+
needs: build-core
79+
runs-on: ubuntu-latest
80+
env:
81+
UV_NO_SOURCES: "1"
82+
steps:
83+
- name: Set up Python
84+
uses: actions/setup-python@v5
85+
with:
86+
python-version: ${{ github.event.inputs.python-version || '3.12' }}
87+
88+
- name: Install uv and testing tools
89+
run: |
90+
python -m pip install uv
91+
uv pip install pytest pytest-asyncio
92+
93+
- name: Install core from TestPyPI using uv
94+
run: |
95+
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple getstream==${{ needs.build-core.outputs.version }}
96+
97+
- name: Run core tests against TestPyPI artifact
98+
run: |
99+
UV_NO_SOURCES=1 uv run pytest tests/ --ignore=getstream/plugins
100+
101+
build-plugins:
102+
name: Build & Test Plugin Packages
103+
runs-on: ubuntu-latest
104+
needs: test-core-index
105+
env:
106+
CORE_VERSION: ${{ needs.build-core.outputs.version }}
107+
UV_NO_SOURCES: "1"
108+
steps:
109+
- uses: actions/checkout@v4
110+
111+
- uses: actions/setup-python@v5
112+
with:
113+
python-version: ${{ github.event.inputs.python-version || '3.12' }}
114+
115+
- name: Install uv & tooling
116+
run: |
117+
python -m pip install uv
118+
uv pip install pytest pytest-asyncio
119+
120+
- name: Install new core from TestPyPI using uv (for plugin builds/tests)
121+
run: |
122+
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple getstream==${CORE_VERSION}
123+
124+
- name: Build all plugin dists (no workspace sources)
125+
run: |
126+
UV_NO_SOURCES=1 uv build --all-packages -o dist-plugins --wheel --sdist
127+
128+
- name: Run plugin tests (local wheels, core from TestPyPI)
129+
run: |
130+
# Install all built plugin wheels using uv
131+
uv pip install dist-plugins/*.whl
132+
uv run pytest getstream/plugins
133+
134+
- name: Publish plugins to TestPyPI
135+
uses: pypa/gh-action-pypi-publish@release/v1
136+
with:
137+
repository-url: https://test.pypi.org/legacy/
138+
packages-dir: dist-plugins
139+
env:
140+
name: testpypi
141+
142+
test-plugins-index:
143+
name: Verify Plugins from TestPyPI
144+
runs-on: ubuntu-latest
145+
needs: build-plugins
146+
env:
147+
CORE_VERSION: ${{ needs.build-core.outputs.version }}
148+
UV_NO_SOURCES: "1"
149+
steps:
150+
- uses: actions/setup-python@v5
151+
with:
152+
python-version: ${{ github.event.inputs.python-version || '3.12' }}
153+
154+
- name: Install uv & test tools
155+
run: |
156+
python -m pip install uv
157+
uv pip install pytest pytest-asyncio
158+
159+
- name: Install core and plugins from TestPyPI using uv
160+
run: |
161+
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple getstream==${CORE_VERSION}
162+
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "getstream-plugins-*"
163+
164+
- name: Run all plugin tests against TestPyPI artifacts
165+
run: |
166+
uv run pytest getstream/plugins
167+
168+
summarize:
169+
name: Publish Test Deployment Report
170+
runs-on: ubuntu-latest
171+
needs: test-plugins-index
172+
steps:
173+
- name: Generate summary
174+
run: |
175+
echo "### Release V2 Test Report" >> $GITHUB_STEP_SUMMARY
176+
echo "* Core Version: ${{ needs.build-core.outputs.version }}" >> $GITHUB_STEP_SUMMARY
177+
echo "* Core build & tests: ✅" >> $GITHUB_STEP_SUMMARY
178+
echo "* Core published to TestPyPI: ✅" >> $GITHUB_STEP_SUMMARY
179+
echo "* Plugins built & tests: ✅" >> $GITHUB_STEP_SUMMARY
180+
echo "* Plugins published to TestPyPI: ✅" >> $GITHUB_STEP_SUMMARY
181+
echo "* Tests against TestPyPI packages: ✅" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)