Download .github/workflows/ci.yml from Modulo-6/api: direct link, hf CLI and curl.
- Browser
- Download file 2.9 kB
-
https://huggingface.co/spaces/Modulo-6/api/resolve/103258c8c38fd4100cd7bdb3de92a75e82b20ddc/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/Modulo-6/api@103258c8c38fd4100cd7bdb3de92a75e82b20ddc/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/Modulo-6/api/resolve/103258c8c38fd4100cd7bdb3de92a75e82b20ddc/.github/workflows/ci.yml
2.9 kB
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| SUPABASE_URL: https://mock.supabase.co | |
| SUPABASE_KEY: mock-key-not-used-in-tests | |
| JWT_SECRET: ci-test-secret-key-not-used-in-production-32chars | |
| ENVIRONMENT: development | |
| MOCK_EXTERNAL_SERVICES: "true" | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install ruff==0.6.9 | |
| - name: Check code style | |
| run: ruff check app/ tests/ | |
| test-camas: | |
| name: Tests — Camas | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: pytest tests/test_camas.py -v | |
| test-quirofanos: | |
| name: Tests — Quirófanos | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: pytest tests/test_quirofanos.py -v | |
| test-solicitudes: | |
| name: Tests — Solicitudes | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: pytest tests/test_solicitudes.py -v | |
| test-webhooks: | |
| name: Tests — Webhooks | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: pytest tests/test_webhooks.py -v | |
| coverage: | |
| name: Coverage report | |
| runs-on: ubuntu-latest | |
| needs: [test-camas, test-quirofanos, test-solicitudes, test-webhooks] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Generate coverage | |
| run: pytest tests/ --cov=app --cov-report=term-missing --cov-report=xml | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| retention-days: 7 | |