Spaces:
Runtime error
Runtime error
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run tests | |
| run: uv run pytest tests/ -v --tb=short | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Check Python syntax | |
| run: uv run python -m py_compile src/open_range/server/app.py | |
| - name: Validate YAML manifests | |
| run: uv run python -c "import yaml; yaml.safe_load(open('manifests/tier1_basic.yaml'))" | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate compose files (if present) | |
| run: | | |
| mapfile -t compose_files < <( | |
| find . -maxdepth 4 -type f \ | |
| \( -name "docker-compose.yml" -o -name "docker-compose.yaml" -o -name "compose.yml" -o -name "compose.yaml" \) | |
| ) | |
| if [ "${#compose_files[@]}" -eq 0 ]; then | |
| echo "No committed compose file found; skipping static compose validation." | |
| exit 0 | |
| fi | |
| for compose_file in "${compose_files[@]}"; do | |
| echo "Validating ${compose_file}" | |
| docker compose -f "${compose_file}" config --quiet | |
| done | |
| - name: Verify Dockerfiles parse correctly | |
| run: | | |
| for f in docker/*.Dockerfile src/open_range/server/Dockerfile; do | |
| echo "Checking $f ..." | |
| docker buildx build --check -f "$f" "${f%/*}" 2>/dev/null || echo " (buildx --check not supported, skipping)" | |
| done | |