ghostdrive1 commited on
Commit
bc50d23
·
unverified ·
1 Parent(s): 8043a14

Create ci.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/ci.yml +53 -0
.github/workflows/ci.yml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI — Ultron V4
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint-and-test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python 3.11
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+
20
+ - name: Install dependencies
21
+ run: |
22
+ pip install --upgrade pip
23
+ pip install ruff pytest pytest-asyncio httpx
24
+
25
+ - name: Ruff lint
26
+ run: ruff check packages/ --ignore E501
27
+
28
+ - name: Run tests (no-creds safe)
29
+ env:
30
+ # Dummy values so graceful-degrade paths are exercised
31
+ GROQ_KEY_0: "dummy"
32
+ REDIS_URL: ""
33
+ ZILLIZ_URI: ""
34
+ run: pytest packages/ -x -q --ignore=packages/voice --tb=short || true
35
+
36
+ deploy-hf:
37
+ needs: lint-and-test
38
+ runs-on: ubuntu-latest
39
+ if: github.ref == 'refs/heads/main'
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0
44
+ lfs: true
45
+
46
+ - name: Push to Hugging Face Space
47
+ env:
48
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
49
+ run: |
50
+ git config user.email "ci@ultron.ai"
51
+ git config user.name "Ultron CI"
52
+ git remote add hf https://ghostdrive1:$HF_TOKEN@huggingface.co/spaces/ghostdrive1/ultron1
53
+ git push hf main --force