forked from vectara/vectara-ingest
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1.16 KB
/
python-tests.yml
File metadata and controls
37 lines (30 loc) · 1.16 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
name: Run Python Unit Tests
on:
pull_request: # Triggers on pull requests to any branch by default when 'branches' is omitted
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"] # From your Dockerfile
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
uv pip install --system -r requirements-extra.txt
# If you have test-specific dependencies, you might have a requirements-test.txt
# pip install -r requirements-test.txt
- name: Run unit tests
run: |
python -m unittest discover -s tests -p "test_*.py"
# If your tests are not in a 'tests' directory or have a different pattern,
# adjust the command above. For example, if tests are at the root:
# python -m unittest discover -p "test_*.py"