-
Notifications
You must be signed in to change notification settings - Fork 26
57 lines (49 loc) · 1.35 KB
/
tests.yaml
File metadata and controls
57 lines (49 loc) · 1.35 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
48
49
50
51
52
53
54
55
56
57
name: "Unit and Integration Tests"
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
# Checkout code
- name: "Checkout"
uses: actions/checkout@v4
# Install UV
- name: "Install uv"
uses: astral-sh/setup-uv@v3
with:
version: "latest"
# Set up Python
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: "Install dependencies"
run: uv sync --all-extras
# Run all tests with coverage
- name: "Run all tests"
env:
OPENAI_API_KEY: "mock-key-for-ci"
USE_MOCK_DATA: "True"
run: |
echo "Running unit and integration tests with coverage..."
uv run pytest tests/unit/ tests/integration/ \
--cov=. --cov-report=xml -v --tb=short
# Upload coverage reports
- name: "Upload coverage reports"
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
with:
file: ./coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true