-
Notifications
You must be signed in to change notification settings - Fork 101
46 lines (37 loc) · 1010 Bytes
/
test.yml
File metadata and controls
46 lines (37 loc) · 1010 Bytes
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
name: Run Test
env:
UV_SYSTEM_PYTHON: 1
# Force CPU-only PyTorch in CI to avoid downloading ~2 GB of NVIDIA/CUDA packages
UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
UV_INDEX_STRATEGY: unsafe-best-match
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
uv-test:
name: python
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install the project
run: make install
- name: Format with black
run: uv run black .
- name: Commit formatted code
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'style: auto-format with black'
file_pattern: '*.py'
- name: Run tests
run: make test