-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 1.77 KB
/
Copy pathpython-tests.yml
File metadata and controls
63 lines (63 loc) · 1.77 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Python tests
on:
push:
paths:
- "src/**"
- "tests/**"
- "conftest.py"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "docs/**/*.py"
- "docs/**/*.mjs"
- ".github/workflows/python-tests.yml"
pull_request:
paths:
- "src/**"
- "tests/**"
- "conftest.py"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "docs/**/*.py"
- "docs/**/*.mjs"
- ".github/workflows/python-tests.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: python-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
OMP_NUM_THREADS: "1"
OPENBLAS_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
MUJOCO_GL: egl
PYGLET_HEADLESS: "1"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
enable-cache: true
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install headless rendering libraries
run: sudo apt-get update && sudo apt-get install -y libegl1 libgl1-mesa-dri
- name: Install locked Python dependencies with CPU PyTorch
run: |
uv export --locked --extra test --no-hashes --no-emit-project --output-file /tmp/constraints.txt
uv venv --python 3.10
uv pip install --torch-backend=cpu --constraint /tmp/constraints.txt -e '.[test]'
- name: Run Python suite
run: uv run --no-sync pytest -q -n 2 --dist loadfile tests --ignore=tests/docs --junitxml=test-results/python.xml
- uses: actions/upload-artifact@v4
if: always()
with:
name: python-test-results
path: test-results/python.xml