Download .github/workflows/ci.yml from Modulo-6/api: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/Modulo-6/api/resolve/31c8dd67e47a516206b4122c4da00a634486a247/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/Modulo-6/api@31c8dd67e47a516206b4122c4da00a634486a247/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/Modulo-6/api/resolve/31c8dd67e47a516206b4122c4da00a634486a247/.github/workflows/ci.yml
1.24 kB
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| 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: | |
| name: Tests (pytest) | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: sqlite:///./test.db | |
| JWT_SECRET: ci-test-secret-key-not-used-in-production-32chars | |
| ENVIRONMENT: development | |
| MOCK_EXTERNAL_SERVICES: "true" | |
| 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 with coverage | |
| run: pytest tests/ -v --cov=app --cov-report=term-missing --cov-report=xml | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| retention-days: 7 | |