mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
78 lines
2.8 KiB
YAML
78 lines
2.8 KiB
YAML
name: Validate MOSS adapter
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "funasr/models/moss_transcribe_diarize/**"
|
|
- "funasr/auto/auto_model.py"
|
|
- "funasr/bin/_server_app.py"
|
|
- "funasr/bin/server.py"
|
|
- "examples/openai_api/**"
|
|
- "examples/industrial_data_pretraining/qwen3_asr/transcribe_vllm_offline*"
|
|
- "tests/test_qwen3_asr_vllm_offline_example.py"
|
|
- "README*.md"
|
|
- "docs/index.rst"
|
|
- "docs/moss_transcribe_diarize*.md"
|
|
- "web-pages/product-site/data/deployments.json"
|
|
- "tests/test_moss_transcribe_diarize_*.py"
|
|
- ".github/workflows/test-moss-adapter.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "funasr/models/moss_transcribe_diarize/**"
|
|
- "funasr/auto/auto_model.py"
|
|
- "funasr/bin/_server_app.py"
|
|
- "funasr/bin/server.py"
|
|
- "examples/openai_api/**"
|
|
- "examples/industrial_data_pretraining/qwen3_asr/transcribe_vllm_offline*"
|
|
- "tests/test_qwen3_asr_vllm_offline_example.py"
|
|
- "README*.md"
|
|
- "docs/index.rst"
|
|
- "docs/moss_transcribe_diarize*.md"
|
|
- "web-pages/product-site/data/deployments.json"
|
|
- "tests/test_moss_transcribe_diarize_*.py"
|
|
- ".github/workflows/test-moss-adapter.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
contract:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
- name: Install contract-test dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install \
|
|
torch --index-url https://download.pytorch.org/whl/cpu
|
|
python -m pip install \
|
|
pytest black==25.1.0 numpy soundfile requests packaging \
|
|
omegaconf hydra-core kaldiio librosa tqdm pyyaml
|
|
- name: Check formatting and syntax
|
|
run: |
|
|
python -m black --check \
|
|
funasr/models/moss_transcribe_diarize/model.py \
|
|
tests/test_moss_transcribe_diarize_model.py \
|
|
tests/test_moss_transcribe_diarize_docs.py \
|
|
examples/industrial_data_pretraining/qwen3_asr/transcribe_vllm_offline.py \
|
|
tests/test_qwen3_asr_vllm_offline_example.py
|
|
python -m py_compile \
|
|
funasr/models/moss_transcribe_diarize/model.py \
|
|
funasr/bin/_server_app.py \
|
|
funasr/bin/server.py \
|
|
examples/openai_api/server.py
|
|
- name: Run adapter and documentation contracts
|
|
run: |
|
|
python -m pytest -q \
|
|
tests/test_moss_transcribe_diarize_model.py \
|
|
tests/test_moss_transcribe_diarize_docs.py \
|
|
tests/test_server_app_openai_segments.py \
|
|
tests/test_qwen3_asr_vllm_offline_example.py
|