Spaces:
Runtime error
Runtime error
Download .github/workflows/ci.yml from asingh38/new-space: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/asingh38/new-space/resolve/main/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/asingh38/new-space/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/asingh38/new-space/resolve/main/.github/workflows/ci.yml
1.13 kB
| name: CI | |
| on: | |
| push: | |
| branches: ["main", "dev"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install flake8 pytest | |
| - name: Lint | |
| run: | | |
| flake8 app.py backend/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 app.py backend/ --count --max-line-length=120 --exit-zero --statistics | |
| - name: Test | |
| env: | |
| OPENAI_API_KEY: "test-key-not-real" | |
| USERS: "testuser:testpass" | |
| run: | | |
| pytest tests/ -v --tb=short || echo "No tests yet — skipping." |