Retry Hugging Face deploy on transient errors #7
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"] | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| - name: Install OpenEnv CLI | |
| run: python -m pip install git+https://github.com/meta-pytorch/OpenEnv.git | |
| - name: Sync environment | |
| run: uv sync --frozen --extra dev | |
| - name: Run tests | |
| run: uv run pytest -q | |
| - name: Validate local environment structure | |
| run: openenv validate --verbose | |
| - name: Start server | |
| run: | | |
| uv run server --port 8000 & | |
| echo $! > server.pid | |
| sleep 8 | |
| - name: Validate running environment | |
| run: openenv validate http://127.0.0.1:8000 | |
| - name: Stop server | |
| if: always() | |
| run: | | |
| if [ -f server.pid ]; then kill $(cat server.pid) || true; fi |