-
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.48 KB
/
Copy pathpytest.yaml
File metadata and controls
46 lines (36 loc) · 1.48 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
name: PyTest for Distributed Learning
on: [pull_request, push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
# Each Python version runs in its own VM, so they can run in parallel
# But we'll run test files sequentially within each VM
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost /usr/local/lib/android || true
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry lock --no-interaction
poetry install --no-interaction --no-ansi
- name: Install CPU-only PyTorch & tensorlink
run: |
pip cache purge || true
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install --no-cache-dir .
- name: Run Tests Sequentially
run: |
poetry run pytest tests/test_node.py -s --disable-warnings
poetry run pytest tests/test_distributed_model.py -s --disable-warnings
poetry run pytest tests/test_model_api.py -s --disable-warnings --maxfail=2