-
Notifications
You must be signed in to change notification settings - Fork 50
37 lines (30 loc) · 1.03 KB
/
Copy pathtest.yml
File metadata and controls
37 lines (30 loc) · 1.03 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: Test
on:
pull_request:
branches: [ main, 'feat/*' ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Load cached venv
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
# Always run the sync — a cache hit only warms .venv; skipping the install on
# a hit lets a partial/poisoned cache (e.g. missing numpy/torch) persist
# forever. `uv sync` is fast and idempotent against a warm cache.
- name: Create venv and install dependencies
run: |
uv sync --all-extras && uv pip install mxbai-rerank
- name: Run tests
run: uv run pytest -v tests/providers tests/unit tests/common_types tests/test_deprecation_warnings.py