-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (48 loc) · 1.74 KB
/
Copy pathci.yml
File metadata and controls
53 lines (48 loc) · 1.74 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
name: CI
# Pull-request gate that needs no simulator or GPU: lint at the pre-commit pin and the
# simulator-free test suite (`-k general`) on the supported CPython versions. Simulator-backed
# suites still run in the merge-queue workflow (premerge-ci.yml) on the GPU runner.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: python -m pip install "ruff==0.14.5" # keep equal to .pre-commit-config.yaml
- run: python -m ruff check --output-format=github .
- run: python -m ruff format --check .
general:
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
name: general (${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install (CPU torch first so pip cannot pick a CUDA wheel)
run: |
python -m pip install --upgrade pip
python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
python -m pip install -e ".[dev,examples,mujoco]" # examples: rootutils/tyro used by test modules; mujoco: module-level imports in general tests
- name: Simulator-free test suite
env:
MUJOCO_GL: disable
run: python -m pytest -k "general and not falls_back_to_private" -q -rs