1+ name : CI – Run Tests
2+
3+ on :
4+ push :
5+ branches : ["main", "master"]
6+ pull_request :
7+ branches : ["main", "master"]
8+
9+ jobs :
10+ test :
11+ name : pytest
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.11"
20+ cache : " pip"
21+
22+ - name : Install dependencies
23+ run : |
24+ pip install --upgrade pip
25+ pip install -r backend/requirements.txt
26+ pip install pytest pytest-cov
27+ pip install flask-wtf bleach Pillow beautifulsoup4 "pydantic[email]" pytest pytest-cov
28+
29+ - name : Run pytest
30+ env :
31+ GOOGLE_BOOKS_API_KEY : " ci-fake-key"
32+ OPENAI_API_KEY : " ci-fake-key"
33+ GROQ_API_KEY : " ci-fake-key"
34+ GEMINI_API_KEY : " ci-fake-key"
35+ FLASK_ENV : testing
36+ PYTHONPATH : " .:backend"
37+ run : |
38+ python -m pytest tests/ \
39+ --ignore=tests/test_llm.py \
40+ --ignore=tests/test_mood_improvements.py \
41+ --ignore=tests/test_mood_cache_db.py \
42+ --ignore=tests/test_category_cache.py \
43+ --ignore=tests/test_env_validation.py \
44+ --ignore=tests/test_purchase_links.py \
45+ -v --tb=short --cov=backend
46+
47+ - name : Install dependencies
48+ run : |
49+ pip install --upgrade pip
50+ pip install torch --index-url https://download.pytorch.org/whl/cpu
51+ pip install -r backend/requirements.txt
52+ pip install flask-wtf bleach Pillow pytest pytest-cov
53+
54+ - name : Install dependencies
55+ run : |
56+ pip install --upgrade pip
57+ pip install torch --index-url https://download.pytorch.org/whl/cpu
58+ pip install -r backend/requirements.txt
59+ pip install flask-wtf bleach Pillow beautifulsoup4 pytest pytest-cov
0 commit comments