fix(redis): 切换同步检查加入自己的心跳机制 #14397 #11227
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: Python Unit Test | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "dbm-ui/backend/**" | |
| - "dbm-ui/config/**" | |
| - "dbm-ui/poetry.lock" | |
| pull_request: | |
| paths: | |
| - "dbm-ui/backend/**" | |
| - "dbm-ui/config/**" | |
| - "dbm-ui/poetry.lock" | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| env: | |
| OS: ubuntu-latest | |
| PYTHON: "3.11.10" | |
| services: | |
| redis: | |
| image: redis | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11.10" | |
| - name: Install Redis Tools | |
| run: sudo apt-get update && sudo apt-get install -y redis-tools | |
| - name: Setup Mysql | |
| run: | | |
| sudo systemctl start mysql.service | |
| - name: "执行单元测试" | |
| run: |- | |
| source ./dbm-ui/scripts/ci/env.sh | |
| export DBA_APP_BK_BIZ_ID=0 | |
| export DB_PASSWORD=root | |
| export REPORT_DB_PASSWORD=root | |
| export REDIS_HOST="localhost" | |
| export REDIS_PORT=6379 | |
| export BROKER_URL="redis://localhost:6379/0" | |
| ./dbm-ui/scripts/ci/bk_ci.sh |