-
Notifications
You must be signed in to change notification settings - Fork 241
47 lines (40 loc) · 1.17 KB
/
python-app.yml
File metadata and controls
47 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Python Test Suite
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run backend tests with coverage
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
FIREBASE_API_KEY: test_key
FIREBASE_AUTH_DOMAIN: test.firebaseapp.com
FIREBASE_PROJECT_ID: test-project
FIREBASE_STORAGE_BUCKET: test.appspot.com
FIREBASE_MESSAGING_SENDER_ID: "123456"
FIREBASE_APP_ID: "1:123:web:abc"
FIREBASE_MEASUREMENT_ID: G-TEST
run: |
pytest tests/ -v --cov=. --cov-report=term-missing
- name: Upload coverage report
uses: codecov/codecov-action@v3
if: always()
with:
fail_ci_if_error: false