Spaces:
Sleeping
Sleeping
0-Parth-D commited on
Commit ·
c6b3953
1
Parent(s): dcac338
added cicd
Browse files- .github/workflow/build_and_test.yml +49 -0
- .gitignore +33 -0
- test_agent.py +1 -0
.github/workflow/build_and_test.yml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Build and Test RAG Assistant
|
| 2 |
+
|
| 3 |
+
# This workflow triggers automatically whenever you push code to GitHub
|
| 4 |
+
on:
|
| 5 |
+
push:
|
| 6 |
+
branches: [ main ]
|
| 7 |
+
pull_request:
|
| 8 |
+
branches: [ main ]
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
build:
|
| 12 |
+
name: Build on ${{ matrix.os }} with Python ${{ matrix.python-version }}
|
| 13 |
+
|
| 14 |
+
# --- THE MATRIX STRATEGY ---
|
| 15 |
+
# This spins up 4 separate cloud computers simultaneously:
|
| 16 |
+
# (Ubuntu + Py3.10), (Ubuntu + Py3.11), (Windows + Py3.10), (Windows + Py3.11)
|
| 17 |
+
strategy:
|
| 18 |
+
matrix:
|
| 19 |
+
os: [ubuntu-latest, windows-latest]
|
| 20 |
+
python-version: ["3.10", "3.11"]
|
| 21 |
+
|
| 22 |
+
runs-on: ${{ matrix.os }}
|
| 23 |
+
|
| 24 |
+
steps:
|
| 25 |
+
# Step 1: Download your code onto the cloud computer
|
| 26 |
+
- name: Checkout Code
|
| 27 |
+
uses: actions/checkout@v4
|
| 28 |
+
|
| 29 |
+
# Step 2: Install the specific Python version from the matrix
|
| 30 |
+
- name: Set up Python ${{ matrix.python-version }}
|
| 31 |
+
uses: actions/setup-python@v5
|
| 32 |
+
with:
|
| 33 |
+
python-version: ${{ matrix.python-version }}
|
| 34 |
+
cache: 'pip' # Speeds up future builds
|
| 35 |
+
|
| 36 |
+
# Step 3: Install all your required Python packages
|
| 37 |
+
- name: Install dependencies
|
| 38 |
+
run: |
|
| 39 |
+
python -m pip install --upgrade pip
|
| 40 |
+
pip install pytest pybind11 scikit-build-core ninja
|
| 41 |
+
pip install -r requirements.txt
|
| 42 |
+
|
| 43 |
+
# Step 4: Compile the C++ extension just like you did locally!
|
| 44 |
+
- name: Compile C++ Tokenizer
|
| 45 |
+
run: pip install ./src/fast_tokenizer
|
| 46 |
+
|
| 47 |
+
# Step 5: Run your pytest suite to ensure the agent logic works
|
| 48 |
+
- name: Run Unit Tests
|
| 49 |
+
run: pytest test_agent.py -v
|
.gitignore
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python
|
| 2 |
+
venv/
|
| 3 |
+
__pycache__/
|
| 4 |
+
*.pyc
|
| 5 |
+
*.pyo
|
| 6 |
+
*.egg-info/
|
| 7 |
+
dist/
|
| 8 |
+
build/
|
| 9 |
+
|
| 10 |
+
# Environment
|
| 11 |
+
.env
|
| 12 |
+
|
| 13 |
+
# IDE
|
| 14 |
+
.vscode/
|
| 15 |
+
.idea/
|
| 16 |
+
*.swp
|
| 17 |
+
*.swo
|
| 18 |
+
|
| 19 |
+
# Jupyter
|
| 20 |
+
.ipynb_checkpoints/
|
| 21 |
+
|
| 22 |
+
# Data
|
| 23 |
+
chroma_db/
|
| 24 |
+
|
| 25 |
+
# OS
|
| 26 |
+
Thumbs.db
|
| 27 |
+
Desktop.ini
|
| 28 |
+
.DS_Store
|
| 29 |
+
|
| 30 |
+
# C++ build artifacts
|
| 31 |
+
*.o
|
| 32 |
+
*.out
|
| 33 |
+
*.exe
|
test_agent.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
assert 1 == 1
|