Repository navigation
61 lines (58 loc) · 2.14 KB
/
Copy pathtest-python-websocket.yml
File metadata and controls
61 lines (58 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Validate Python WebSocket
on:
pull_request:
paths:
- "runtime/python/websocket/funasr_wss_server.py"
- "runtime/python/websocket/funasr_wss_client.py"
- "tests/test_websocket_server_asr_model.py"
- "tests/test_websocket_server_hotwords.py"
- "tests/test_websocket_file_finalization.py"
- "tests/test_websocket_client_hotwords.py"
- "tests/test_websocket_server_audio_fs.py"
- ".github/workflows/test-python-websocket.yml"
push:
branches:
- main
paths:
- "runtime/python/websocket/funasr_wss_server.py"
- "runtime/python/websocket/funasr_wss_client.py"
- "tests/test_websocket_server_asr_model.py"
- "tests/test_websocket_server_hotwords.py"
- "tests/test_websocket_file_finalization.py"
- "tests/test_websocket_client_hotwords.py"
- "tests/test_websocket_server_audio_fs.py"
- ".github/workflows/test-python-websocket.yml"
permissions:
contents: read
jobs:
websocket:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install isolated protocol test dependencies
run: |
python -m pip install pytest numpy scipy websockets
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Run constructor, hotword, client hotword, file-finalization and sample-rate regressions
run: >-
python -m pytest -q
tests/test_websocket_server_asr_model.py
tests/test_websocket_server_hotwords.py
tests/test_websocket_file_finalization.py
tests/test_websocket_client_hotwords.py
tests/test_websocket_server_audio_fs.py
--junitxml=websocket-test-results.xml
- uses: actions/upload-artifact@v4
if: always()
with:
name: websocket-tests-py${{ matrix.python-version }}
path: websocket-test-results.xml
if-no-files-found: error