Skip to content

Commit 00d2ccd

Browse files
committed
[ci] simplify dependency installation in GitHub Actions workflow
1 parent 9188282 commit 00d2ccd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/test-graph-jacobian.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121

22-
- name: Install dependencies (venv)
22+
- name: Install dependencies
2323
run: |
24-
python -m venv --system-site-packages .venv
25-
./.venv/bin/python -m pip install --upgrade pip
26-
./.venv/bin/python -m pip install pytest
24+
python -m pip install --break-system-packages --no-cache-dir --target /tmp/pydeps pytest
2725
env:
2826
PIP_CACHE_DIR: /tmp/pip-cache
2927

3028
- name: Run tests
3129
env:
32-
PYTHONPATH: ${{ github.workspace }}
30+
PYTHONPATH: /tmp/pydeps:${{ github.workspace }}
3331
run: |
34-
./.venv/bin/python -c "import torch; print('torch', torch.__version__)"
35-
./.venv/bin/python -m pytest -q tests/autograd/test_graph_jacobian.py
32+
python -c "import torch; print('torch', torch.__version__)"
33+
python -m pytest -q tests/autograd/test_graph_jacobian.py

0 commit comments

Comments
 (0)