-
Notifications
You must be signed in to change notification settings - Fork 42
59 lines (47 loc) · 1.22 KB
/
ci.yml
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
58
59
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.9"
- name: ruff check
run: uv run ruff check
- name: ruff format --check
run: uv run ruff format --check
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
# don't use uv install python because we need a system python for
# numpy wheel builds
- name: install python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.9"
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync --all-extras --dev
- name: cache huggingface
uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-hf-models-${{ hashFiles('**/lockfiles') }}
restore-keys: |
${{ runner.os }}-hf-models-
- run: uv run pytest