fix: 后端容器添加时区配置 TZ=Asia/Shanghai #23
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: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| backend-test: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: backend/requirements.txt | |
| - name: Install dependencies | |
| working-directory: backend | |
| run: | | |
| pip install -r requirements.txt | |
| pip install pytest pytest-asyncio httpx | |
| - name: Run tests | |
| working-directory: backend | |
| env: | |
| ADMIN_PASSWORD: test_password_123 | |
| JWT_SECRET: ci-test-secret-key | |
| DATABASE_URL: "sqlite:///test.db" | |
| REDIS_URL: "" | |
| DEBUG: "true" | |
| run: pytest -v | |
| frontend-build: | |
| name: Frontend Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: frontend | |
| run: npm ci || npm install | |
| - name: Build | |
| working-directory: frontend | |
| run: npm run build |