mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
Upstream's edge-tts workaround (msedgeservices 403 fix) now imports edge_tts.communicate explicitly; the conftest shim only registered the .exceptions submodule, so 4 tts tests failed after the sync. Same pattern as the existing opuslib_next submodule shims. Also widen CI + rebase gate from smoke-only to the full pytest suite and the unittest-only lifecycle tests (the smoke run masked these failures).
79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
westernization-audit:
|
|
name: Westernization audit
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Run westernization audit
|
|
run: bash scripts/westernization_audit.sh
|
|
|
|
python:
|
|
name: Python (xiaozhi-server)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
cache: 'pip'
|
|
cache-dependency-path: 'main/xiaozhi-server/requirements.txt'
|
|
- name: Install dependencies
|
|
working-directory: main/xiaozhi-server
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pytest pytest-asyncio freezegun
|
|
- name: Run tests
|
|
working-directory: main/xiaozhi-server
|
|
run: |
|
|
pytest tests/ -q
|
|
- name: Run unittest-only lifecycle tests
|
|
working-directory: main/xiaozhi-server
|
|
env:
|
|
PYTHONPATH: .
|
|
run: |
|
|
python3 -B -m unittest discover -s tests -p 'test_*lifecycle*.py'
|
|
|
|
java:
|
|
name: Java (manager-api)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
cache: 'maven'
|
|
- name: Run tests
|
|
working-directory: main/manager-api
|
|
run: mvn -B -q test -DfailIfNoTests=false
|
|
|
|
web:
|
|
name: Vue (manager-web)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: main/manager-web/package-lock.json
|
|
- name: Run tests
|
|
working-directory: main/manager-web
|
|
run: |
|
|
npm ci --no-audit --no-fund
|
|
node scripts/integrity-check.js
|
|
npm run check:i18n
|
|
npm run test:snapshot
|
|
npm run test:contract
|
|
npm run test:unit
|