mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
Server runtime: - translate model-visible strings: direct_answer tool schema, web_search tool desc/errors/results, call_device tool desc/replies, hass_state desc/report strings; they were Chinese text fed to LLMs and devices - replace Chinese pconline geocoder with ip-api.com (English city names) - prompt_manager: drop dead Chinese WEEKDAY_MAP, stop forcing lang=zh_CN for weather, English fallback location - delete orphan alibl_endpoint.py (no importers after AliBL removal) and dead initialize_voiceprint() calling a nonexistent ASR hook - translate mcp_server_settings.json descriptors - test_current_time: assert English weekday/date behavior (upstream test still expected Chinese weekdays) Docs/branding: - README and docs/guides/voiceprint.md: voiceprint IS implemented via the HTTP VoiceprintProvider; document the real protocol (health/identify) and privacy notes instead of falsely claiming the feature is missing - issue templates: English Ops: - Dockerfile-server-base: drop Aliyun PyPI mirror from published image - LICENSE: keep xinnan-tech copyright notice alongside downstream (MIT) - CI: run westernization_audit as a gate; make smoke test failure fatal - westernization.md: point python verification at the real pytest layout
69 lines
1.8 KiB
YAML
69 lines
1.8 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 smoke test
|
|
working-directory: main/xiaozhi-server
|
|
run: |
|
|
pytest tests/test_smoke.py -x -q
|
|
|
|
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
|
|
npm run test:unit
|