Spaces:
Build error
Build error
Download .github/workflows/ci.yml from minhtudragon/headroom_3: direct link, hf CLI and curl.
- Browser
- Download file 3.08 kB
-
https://huggingface.co/spaces/minhtudragon/headroom_3/resolve/6de75aa0760d091e998ad0a3b16c408e5520da18/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/minhtudragon/headroom_3@6de75aa0760d091e998ad0a3b16c408e5520da18/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/minhtudragon/headroom_3/resolve/6de75aa0760d091e998ad0a3b16c408e5520da18/.github/workflows/ci.yml
3.08 kB
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run linting | |
| if: matrix.python-version == '3.12' | |
| run: | | |
| ruff check . | |
| ruff format --check . | |
| - name: Run type checking | |
| if: matrix.python-version == '3.12' | |
| run: | | |
| mypy headroom --ignore-missing-imports | |
| - name: Run tests | |
| run: | | |
| pytest -v --tb=short | |
| - name: Run tests with coverage | |
| if: matrix.python-version == '3.11' | |
| run: | | |
| pytest --cov=headroom --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| test-extras: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install with relevance extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,relevance]" | |
| - name: Run relevance tests | |
| run: | | |
| pytest tests/test_relevance.py -v | |
| test-agno: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install with agno extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,agno]" | |
| - name: Run agno tests | |
| run: | | |
| pytest tests/test_integrations/agno/ -v | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install build tools | |
| run: | | |
| python -m pip install --upgrade pip build twine | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Check package | |
| run: | | |
| twine check dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |