Skip to content

Commit ddb1a75

Browse files
committed
Workflows + Code exec sbx
1 parent aa3a323 commit ddb1a75

40 files changed

+2540
-182
lines changed

.github/workflows/audio-tts-tests.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ jobs:
3838
python-version: "3.12"
3939
- os: ubuntu-latest
4040
python-version: "3.13"
41+
- os: macos-latest
42+
python-version: "3.12"
43+
- os: windows-latest
44+
python-version: "3.12"
4145
env:
4246
PYTHONUNBUFFERED: '1'
4347
TEST_MODE: 'true'
@@ -52,19 +56,8 @@ jobs:
5256
cache-dependency-path: |
5357
pyproject.toml
5458
uv.lock
55-
- name: Install system dependencies (FFmpeg)
56-
if: runner.os == 'Linux'
57-
run: |
58-
sudo apt-get update
59-
sudo apt-get install -y ffmpeg
60-
- name: Install system dependencies (macOS)
61-
if: runner.os == 'macOS'
62-
run: |
63-
brew install ffmpeg || true
64-
- name: Install system dependencies (Windows)
65-
if: runner.os == 'Windows'
66-
run: |
67-
choco install ffmpeg -y
59+
- name: Install FFmpeg (multi-OS)
60+
uses: ./.github/actions/setup-ffmpeg
6861
- name: Install Python deps (dev)
6962
run: |
7063
python -m pip install --upgrade pip

.github/workflows/db-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
python-version: "3.12"
3131
- os: ubuntu-latest
3232
python-version: "3.13"
33+
- os: macos-latest
34+
python-version: "3.12"
35+
- os: windows-latest
36+
python-version: "3.12"
3337
env:
3438
PYTHONUNBUFFERED: '1'
3539
TEST_MODE: 'true'

.github/workflows/e2e-smoke.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ jobs:
119119
SERVER_LABEL: single
120120
shell: bash
121121
run: |
122-
python tldw_Server_API/scripts/server_lifecycle.py stop
122+
if [ -f "tldw_Server_API/scripts/server_lifecycle.py" ]; then
123+
python tldw_Server_API/scripts/server_lifecycle.py stop || true
124+
else
125+
echo "server_lifecycle.py not found; skipping stop for '${SERVER_LABEL}'";
126+
fi
123127
124128
- name: Print server log (single-user)
125129
if: failure()
@@ -171,7 +175,11 @@ jobs:
171175
SERVER_LABEL: multi
172176
shell: bash
173177
run: |
174-
python tldw_Server_API/scripts/server_lifecycle.py stop
178+
if [ -f "tldw_Server_API/scripts/server_lifecycle.py" ]; then
179+
python tldw_Server_API/scripts/server_lifecycle.py stop || true
180+
else
181+
echo "server_lifecycle.py not found; skipping stop for '${SERVER_LABEL}'";
182+
fi
175183
176184
- name: Print server log (multi-user)
177185
if: failure()

.github/workflows/embeddings-tests.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,12 @@ jobs:
226226
uv.lock
227227
tldw_Server_API/requirements.txt
228228
229-
- name: Install Postgres client (pg_isready)
230-
run: |
231-
sudo apt-get update
232-
sudo apt-get install -y postgresql-client
233-
234-
- name: Wait for Postgres service
235-
run: |
236-
for i in {1..60}; do
237-
if pg_isready -h 127.0.0.1 -p 5432 -U postgres; then
238-
echo "Postgres is ready"; break; fi;
239-
echo "Waiting for Postgres..."; sleep 2;
240-
done
229+
- name: Install pg client and wait for Postgres
230+
uses: ./.github/actions/wait-for-postgres
231+
with:
232+
host: 127.0.0.1
233+
port: ${{ job.services.postgres.ports[5432] }}
234+
user: postgres
241235

242236
- name: Install dependencies
243237
run: |
@@ -292,17 +286,12 @@ jobs:
292286
pyproject.toml
293287
uv.lock
294288
tldw_Server_API/requirements.txt
295-
- name: Install Postgres client (pg_isready)
296-
run: |
297-
sudo apt-get update
298-
sudo apt-get install -y postgresql-client
299-
- name: Wait for Postgres service
300-
run: |
301-
for i in {1..60}; do
302-
if pg_isready -h 127.0.0.1 -p 5432 -U postgres; then
303-
echo "Postgres is ready"; break; fi;
304-
echo "Waiting for Postgres..."; sleep 2;
305-
done
289+
- name: Install pg client and wait for Postgres
290+
uses: ./.github/actions/wait-for-postgres
291+
with:
292+
host: 127.0.0.1
293+
port: ${{ job.services.postgres.ports[5432] }}
294+
user: postgres
306295
- name: Install runtime dependencies
307296
run: |
308297
python -m pip install --upgrade pip

.github/workflows/llm-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
python-version: "3.12"
3636
- os: ubuntu-latest
3737
python-version: "3.13"
38+
- os: macos-latest
39+
python-version: "3.12"
40+
- os: windows-latest
41+
python-version: "3.12"
3842
env:
3943
PYTHONUNBUFFERED: '1'
4044
TEST_MODE: 'true'

.github/workflows/mcp-unified-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
python-version: "3.12"
3131
- os: ubuntu-latest
3232
python-version: "3.13"
33+
- os: macos-latest
34+
python-version: "3.12"
35+
- os: windows-latest
36+
python-version: "3.12"
3337
env:
3438
PYTHONUNBUFFERED: '1'
3539
TEST_MODE: 'true'

.github/workflows/media-tests.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
python-version: "3.12"
3535
- os: ubuntu-latest
3636
python-version: "3.13"
37+
- os: macos-latest
38+
python-version: "3.12"
39+
- os: windows-latest
40+
python-version: "3.12"
3741
env:
3842
PYTHONUNBUFFERED: '1'
3943
TEST_MODE: 'true'
@@ -48,19 +52,8 @@ jobs:
4852
cache-dependency-path: |
4953
pyproject.toml
5054
uv.lock
51-
- name: Install system dependencies (FFmpeg)
52-
if: runner.os == 'Linux'
53-
run: |
54-
sudo apt-get update
55-
sudo apt-get install -y ffmpeg
56-
- name: Install system dependencies (macOS)
57-
if: runner.os == 'macOS'
58-
run: |
59-
brew install ffmpeg || true
60-
- name: Install system dependencies (Windows)
61-
if: runner.os == 'Windows'
62-
run: |
63-
choco install ffmpeg -y
55+
- name: Install FFmpeg (multi-OS)
56+
uses: ./.github/actions/setup-ffmpeg
6457
- name: Install Python deps (dev)
6558
run: |
6659
python -m pip install --upgrade pip

.github/workflows/python-tldw.yml

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -304,21 +304,19 @@ jobs:
304304
pyproject.toml
305305
uv.lock
306306
307-
- name: Install system dependencies (Ubuntu)
307+
- name: Install FFmpeg (multi-OS)
308+
uses: ./.github/actions/setup-ffmpeg
309+
310+
- name: Install PortAudio (Linux)
308311
if: runner.os == 'Linux'
309312
run: |
310313
sudo apt-get update
311-
sudo apt-get install -y portaudio19-dev python3-all-dev ffmpeg
314+
sudo apt-get install -y portaudio19-dev python3-all-dev
312315
313-
- name: Install system dependencies (macOS)
316+
- name: Install PortAudio (macOS)
314317
if: runner.os == 'macOS'
315318
run: |
316-
brew install portaudio ffmpeg
317-
318-
- name: Install system dependencies (Windows)
319-
if: runner.os == 'Windows'
320-
run: |
321-
choco install ffmpeg -y
319+
brew install portaudio || true
322320
323321
- name: Install Python dependencies
324322
run: |
@@ -394,17 +392,12 @@ jobs:
394392
pyproject.toml
395393
uv.lock
396394
397-
- name: Install system deps (ffmpeg, pg client)
398-
run: |
399-
sudo apt-get update
400-
sudo apt-get install -y ffmpeg postgresql-client
401-
- name: Wait for Postgres service
402-
uses: ./.github/actions/wait-for-postgres
395+
- name: Install ffmpeg + pg client and wait for PG
396+
uses: ./.github/actions/ffmpeg-pg-wait
403397
with:
404398
host: localhost
405399
port: ${{ env.POSTGRES_TEST_PORT }}
406400
user: tldw
407-
install-client: 'false'
408401

409402
- name: Install additional Python dependencies
410403
run: |
@@ -470,6 +463,7 @@ jobs:
470463
TLDW_PS_TC_COUNT: "250"
471464
TLDW_PS_ITERATIONS: "5"
472465
TLDW_PS_OPT_COUNT: "3"
466+
PYTEST_DISABLE_PLUGIN_AUTOLOAD: '1'
473467
steps:
474468
- name: Checkout repository
475469
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
@@ -483,17 +477,12 @@ jobs:
483477
pyproject.toml
484478
uv.lock
485479
486-
- name: Install system deps (ffmpeg, pg client)
487-
run: |
488-
sudo apt-get update
489-
sudo apt-get install -y ffmpeg postgresql-client
490-
- name: Wait for Postgres service
491-
uses: ./.github/actions/wait-for-postgres
480+
- name: Install ffmpeg + pg client and wait for PG
481+
uses: ./.github/actions/ffmpeg-pg-wait
492482
with:
493483
host: localhost
494484
port: ${{ env.POSTGRES_TEST_PORT }}
495485
user: tldw
496-
install-client: 'false'
497486

498487
- name: Install Python dependencies
499488
run: |
@@ -560,17 +549,12 @@ jobs:
560549
pyproject.toml
561550
uv.lock
562551
563-
- name: Install system deps (ffmpeg, pg client)
564-
run: |
565-
sudo apt-get update
566-
sudo apt-get install -y ffmpeg postgresql-client
567-
- name: Wait for Postgres service
568-
uses: ./.github/actions/wait-for-postgres
552+
- name: Install ffmpeg + pg client and wait for PG
553+
uses: ./.github/actions/ffmpeg-pg-wait
569554
with:
570555
host: localhost
571556
port: ${{ env.TEST_DB_PORT }}
572557
user: ${{ env.TEST_DB_USER }}
573-
install-client: 'false'
574558

575559
- name: Install Python dependencies
576560
run: |
@@ -622,10 +606,13 @@ jobs:
622606
pyproject.toml
623607
uv.lock
624608
625-
- name: Install system dependencies
609+
- name: Install FFmpeg (multi-OS)
610+
uses: ./.github/actions/setup-ffmpeg
611+
- name: Install system dependencies (Linux)
612+
if: runner.os == 'Linux'
626613
run: |
627614
sudo apt-get update
628-
sudo apt-get install -y portaudio19-dev python3-all-dev ffmpeg
615+
sudo apt-get install -y portaudio19-dev python3-all-dev
629616
630617
- name: Install Python dependencies
631618
run: |
@@ -666,10 +653,13 @@ jobs:
666653
pyproject.toml
667654
uv.lock
668655
669-
- name: Install system dependencies
656+
- name: Install FFmpeg (multi-OS)
657+
uses: ./.github/actions/setup-ffmpeg
658+
- name: Install system dependencies (Linux)
659+
if: runner.os == 'Linux'
670660
run: |
671661
sudo apt-get update
672-
sudo apt-get install -y portaudio19-dev python3-all-dev ffmpeg
662+
sudo apt-get install -y portaudio19-dev python3-all-dev
673663
674664
- name: Install Python dependencies
675665
run: |
@@ -994,7 +984,11 @@ jobs:
994984
if: always()
995985
run: |
996986
export SERVER_LABEL=mcp
997-
python tldw_Server_API/scripts/server_lifecycle.py stop
987+
if [ -f "tldw_Server_API/scripts/server_lifecycle.py" ]; then
988+
python tldw_Server_API/scripts/server_lifecycle.py stop || true
989+
else
990+
echo "server_lifecycle.py not found; skipping stop for '${SERVER_LABEL}'";
991+
fi
998992
999993
mcp-tests:
1000994
name: MCP Tests (gated)
@@ -1008,6 +1002,7 @@ jobs:
10081002
DISABLE_HEAVY_STARTUP: "1"
10091003
MCP_JWT_SECRET: test_secret_key_for_ci_only_32_chars_minimum
10101004
MCP_API_KEY_SALT: test_salt_key_for_ci_only_32_chars_minimum
1005+
PYTEST_DISABLE_PLUGIN_AUTOLOAD: '1'
10111006
steps:
10121007
- name: Checkout repository
10131008
uses: actions/checkout@v4

.github/workflows/rag-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
python-version: "3.12"
3333
- os: ubuntu-latest
3434
python-version: "3.13"
35+
- os: macos-latest
36+
python-version: "3.12"
37+
- os: windows-latest
38+
python-version: "3.12"
3539
env:
3640
PYTHONUNBUFFERED: '1'
3741
TEST_MODE: 'true'

.github/workflows/vector-chroma-tests.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,23 @@ permissions:
2121

2222
jobs:
2323
chroma:
24-
runs-on: ubuntu-latest
24+
name: Vector Chroma - ${{ matrix.os }} - Python ${{ matrix.python-version }}
25+
runs-on: ${{ matrix.os }}
2526
timeout-minutes: 15
2627
strategy:
2728
fail-fast: false
2829
matrix:
29-
python-version: ['3.11','3.12','3.13']
30+
include:
31+
- os: ubuntu-latest
32+
python-version: '3.11'
33+
- os: ubuntu-latest
34+
python-version: '3.12'
35+
- os: ubuntu-latest
36+
python-version: '3.13'
37+
- os: macos-latest
38+
python-version: '3.12'
39+
- os: windows-latest
40+
python-version: '3.12'
3041
steps:
3142
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
3243
- name: Setup Python and deps (with uv)
@@ -62,4 +73,3 @@ jobs:
6273
uses: EnricoMi/publish-unit-test-result-action@v2
6374
with:
6475
files: vector-chroma-*.xml
65-

0 commit comments

Comments
 (0)