ghostdrive1's picture
Create ci.yml
bc50d23 unverified
Raw
History Blame Contribute Delete
1.35 kB
name: CI Ultron V4
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install ruff pytest pytest-asyncio httpx
- name: Ruff lint
run: ruff check packages/ --ignore E501
- name: Run tests (no-creds safe)
env:
# Dummy values so graceful-degrade paths are exercised
GROQ_KEY_0: "dummy"
REDIS_URL: ""
ZILLIZ_URI: ""
run: pytest packages/ -x -q --ignore=packages/voice --tb=short || true
deploy-hf:
needs: lint-and-test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config user.email "ci@ultron.ai"
git config user.name "Ultron CI"
git remote add hf https://ghostdrive1:$HF_TOKEN@huggingface.co/spaces/ghostdrive1/ultron1
git push hf main --force