Version 1.3.10 #68
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: | |
| lint-and-format: | |
| runs-on: ubuntu-latest | |
| name: "Lint & Format Check" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "0.7.3" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: make install | |
| - name: Check formatting and linting | |
| run: make lint | |
| type-check: | |
| runs-on: ubuntu-latest | |
| name: "Type Check" | |
| continue-on-error: true # Allow this to fail without failing the whole CI | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "0.7.3" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: make install | |
| - name: Run type checking | |
| run: make pyright | |
| test: | |
| runs-on: ubuntu-latest | |
| name: "Tests & Coverage" | |
| needs: [lint-and-format] # Only run if linting passes | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "0.7.3" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: make install | |
| - name: Install Redis CLI | |
| run: sudo apt-get update && sudo apt-get install -y redis-tools | |
| - name: Wait for Redis to be ready | |
| run: | | |
| timeout 30 bash -c 'until redis-cli -h localhost -p 6379 ping; do sleep 1; done' | |
| - name: Run tests with coverage | |
| run: make coverage-xml | |
| env: | |
| DJHTMX_REDIS_URL: redis://localhost:6379/0 |