Skip to content

refactor: 统一默认Bot ID为常量 DEFAULT_BOT_ID = main #17

refactor: 统一默认Bot ID为常量 DEFAULT_BOT_ID = main

refactor: 统一默认Bot ID为常量 DEFAULT_BOT_ID = main #17

Workflow file for this run

name: CI
on:
push:
branches: [main, master, 'feat/**', 'fix/**', 'release/**']
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
backend/requirements.txt
backend/requirements-test.txt
- name: Install dependencies
run: |
cd backend
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run tests with coverage
run: |
cd backend
mkdir -p data
pytest tests/ \
-m "not slow" \
--cov=app \
--cov=plugins \
--cov-report=term \
--cov-report=term-missing \
--cov-report=xml \
--cov-report=html \
--cov-report=json \
--cov-fail-under=52 \
--durations=10 \
-v
env:
FAIL_ON_REDIS_ERROR: "false"
- name: Upload coverage to Codecov (optional)
uses: codecov/codecov-action@v4
with:
file: ./backend/coverage.xml
flags: unittests
continue-on-error: true