Spaces:
Sleeping
Sleeping
Download .github/workflows/ci.yml from joemartis/AccessibilityToolkit: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/spaces/joemartis/AccessibilityToolkit/resolve/main/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/joemartis/AccessibilityToolkit/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/joemartis/AccessibilityToolkit/resolve/main/.github/workflows/ci.yml
1.3 kB
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| tests: | |
| name: Unit + HTTP smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install QPDF (for pikepdf) and dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends qpdf | |
| pip install -r requirements.txt | |
| - name: Acronym regression tests | |
| run: python tests/test_acronyms.py | |
| - name: Start app | |
| run: | | |
| uvicorn backend.app.main:app --host 127.0.0.1 --port 8000 & | |
| echo $! > /tmp/uvicorn.pid | |
| for i in $(seq 1 30); do | |
| curl -fs http://127.0.0.1:8000/api/health >/dev/null && exit 0 | |
| sleep 1 | |
| done | |
| echo "app failed to start"; exit 1 | |
| - name: HTTP smoke test | |
| run: bash scripts/smoke_test.sh http://127.0.0.1:8000 | |
| - name: Stop app | |
| if: always() | |
| run: kill "$(cat /tmp/uvicorn.pid)" 2>/dev/null || true | |
| docker: | |
| name: Docker image smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build image, run container, smoke test | |
| run: bash scripts/docker_smoke.sh | |