fix: 过滤政治话题并禁止诊断图自动发送 #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| backend: | |
| name: Backend tests | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-dev.txt | |
| requirements.lock | |
| - name: Install dependencies | |
| run: python -m pip install -r requirements.txt -r requirements-dev.txt -c requirements.lock | |
| - name: Run tests and generate Sonar coverage | |
| run: python -m pytest tests -q --cov=app --cov=scripts --cov-report=xml:coverage.xml | |
| - name: Run tests in deterministic random order | |
| run: python -m pytest tests -q --random-order-seed=20260825 | |
| - name: Compile Python sources | |
| run: python -m compileall -q app scripts tests | |
| frontend: | |
| name: Frontend build | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22.22.2" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build frontend | |
| run: npm run build | |
| - name: Run frontend unit tests | |
| run: npm test | |
| - name: Run browser E2E with Fake API | |
| run: npm run test:e2e |