Skip to content

Commit 34dd03f

Browse files
author
Allen Wang
committed
use conda
1 parent 5b0e080 commit 34dd03f

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21+
- name: Setup conda env
22+
uses: conda-incubator/setup-miniconda@v2
23+
with:
24+
auto-update-conda: true
25+
miniconda-version: "latest"
26+
activate-environment: test
27+
python-version: '3.10'
28+
auto-activate: false
2129
- name: Update pip
2230
shell: bash -l {0}
2331
run: python -m pip install --upgrade pip
@@ -26,7 +34,7 @@ jobs:
2634
run: curl -LsSf https://astral.sh/uv/install.sh | sh
2735
- name: Install torchforge
2836
shell: bash -l {0}
29-
run: uv sync --all-extras && source .venv/bin/activate
37+
run: uv sync
3038
- name: Install docs dependencies
3139
shell: bash -l {0}
3240
run: python -m pip install -r docs/requirements.txt

.github/workflows/gpu_test.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,19 @@ jobs:
2828
steps:
2929
- name: Check out repo
3030
uses: actions/checkout@v4
31-
- name: Install uv
32-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
31+
- name: Setup conda env
32+
uses: conda-incubator/setup-miniconda@v2
33+
with:
34+
auto-update-conda: true
35+
miniconda-version: "latest"
36+
activate-environment: test
37+
python-version: ${{ matrix.python-version }}
38+
- name: Update pip
39+
run: python -m pip install --upgrade pip
3340
- name: Install torchforge
34-
run: uv sync --all-extras && source .venv/bin/activate
41+
run: uv sync
3542
- name: Run unit tests with coverage
3643
# TODO add all tests
37-
run: uv run pytest tests/unit_tests --cov=. --cov-report=xml --durations=20 -vv
44+
run: pytest tests/unit_tests --cov=. --cov-report=xml --durations=20 -vv
3845
- name: Upload Coverage to Codecov
3946
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)