-
Notifications
You must be signed in to change notification settings - Fork 18
48 lines (44 loc) · 1.04 KB
/
build-and-test.yml
File metadata and controls
48 lines (44 loc) · 1.04 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
name: Build and Test
on:
push:
branches:
- main
- "dev-v[0-9]*"
paths:
- "src/**"
- "test/**"
- "pyproject.toml"
pull_request:
branches:
- main
- "dev-v[0-9]*"
paths:
- "src/**"
- "test/**"
- "pyproject.toml"
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install uv
id: setup-uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.11"
enable-cache: true
- name: Cache HF models
uses: actions/cache@v3
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-hf-${{ hashFiles('**/*.py') }}
restore-keys: |
${{ runner.os }}-hf-
- name: Test with pytest
run: |
uv run --frozen --group test -p ${{ matrix.python-version }} pytest -vv test/