-
Notifications
You must be signed in to change notification settings - Fork 450
52 lines (43 loc) · 1.28 KB
/
pretest.yaml
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
name: "CPU Tests"
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'notebooks/**'
- 'scripts/**'
- 'README.md'
jobs:
static-checks:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Checkout using commit hash to make "no-commit-to-branch" test pass.
ref: ${{ github.sha }}
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Dependencies
run: |
# Install in system python as we're in a sandbox env
# Install in verbose mode to see what's going on
uv pip install -e '.[ci_cpu]' --system
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit checks
run: |
pre-commit run --all-files --show-diff-on-failure
- name: Run tests
run: |
cd ./tests/unit/
pytest -s -m "not e2e and not e2e_eternal and not single_gpu and not multi_gpu" --durations=50 --timeout=300