Files
RuoYi-Vue3-FastAPI/.github/workflows/backend.yml
T
insistence 726883f68a feat: 新增跨时区支持并完善定时任务调度 (#127)
* feat: 新增跨时区支持

* perf: 优化代码

* fix: 修复测试

* perf: 优化调度器日志打印
2026-09-12 17:01:05 +08:00

65 lines
1.9 KiB
YAML

name: Backend Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
pytest:
runs-on: ubuntu-latest
env:
# Typer otherwise forces ANSI help output when GITHUB_ACTIONS is set.
_TYPER_FORCE_DISABLE_TERMINAL: "1"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
defaults:
run:
working-directory: ruoyi-fastapi-backend
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
ruoyi-fastapi-backend/requirements.txt
ruoyi-fastapi-backend/plugins/ai/plugin.yaml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt pytest pytest-asyncio aiosqlite
- name: Install AI plugin dependencies
run: |
pip install \
agno==2.8.6 \
anthropic==0.120.2 \
cerebras-cloud-sdk==1.91.0 \
cohere==7.0.8 \
google-genai==2.16.0 \
groq==1.6.0 \
litellm==1.94.0 \
llama-api-client==0.6.0 \
mistralai==2.8.0 \
ollama==0.6.2 \
openai==2.52.0 \
portkey-ai==2.3.4
- name: Run backend tests
run: pytest -q
- name: Check timezone behavior under independent host timezones
run: |
for zone in UTC Asia/Shanghai America/New_York; do
TZ="$zone" python -m pytest -q tests/common/test_types.py tests/common/test_query_time.py tests/utils/test_time_util.py tests/config/test_scheduler_database.py tests/utils/test_cron_util.py tests/module_admin/controller/test_job_controller.py tests/config/test_scheduler_job_persistence.py
done