Skip to content

Commit f45c3c9

Browse files
ariefshaik7hangfei
authored andcommitted
ci: add unit test workflow
1 parent e15af6d commit f45c3c9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Python Unit Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
# Test against all Python versions supported in pyproject.toml
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install the latest version of uv
27+
uses: astral-sh/setup-uv@v6
28+
29+
- name: Install dependencies
30+
run: |
31+
uv venv .venv
32+
source .venv/bin/activate
33+
# Install dependencies as recommended in CONTRIBUTING.md
34+
uv sync --extra test --extra eval --extra a2a
35+
36+
- name: Run unit tests with pytest
37+
run: |
38+
source .venv/bin/activate
39+
# Run all tests in the tests/unittests directory
40+
pytest tests/unittests

0 commit comments

Comments
 (0)