Skip to content

Commit

Permalink
Merge pull request #456 from mdekstrand/tweak/hpf-conda-ci
Browse files Browse the repository at this point in the history
Use Conda for HPF CI tests
  • Loading branch information
mdekstrand authored Jul 26, 2024
2 parents 67a49f5 + 5dbf903 commit f06211d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ jobs:
name: HPF bridge tests on Python ${{matrix.python}}
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
Expand All @@ -479,27 +482,25 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🐍 Set up Python
id: install-python
- name: 🐍 Setup bootstrap Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
cache: pip
cache-dependency-path: |
requirements*.txt
*/pyproject.toml
- name: πŸ•ΆοΈ Set up uv
python-version: '3.11'
- name: πŸ‘’ Generate Conda environment file
run: |
pip install -U 'uv>=0.1.15'
- name: πŸ“¦ Set up Python dependencies
id: install-deps
pip install -e .
python -m lkdev.conda -o ci-environment.yml -e all requirements-test.txt lenskit/pyproject.toml lenskit-hpf/pyproject.toml
- id: setup
name: πŸ“¦ Set up Conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci-environment.yml
environment-name: lkpy
cache-environment: true
init-shell: bash
- name: 🍱 Install LensKit packages
run: |
uv pip install --python $PYTHON -r requirements-test.txt -e lenskit -e lenskit-hpf
shell: bash
env:
PYTHON: ${{steps.install-python.outputs.python-path}}
UV_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
UV_INDEX_STRATEGY: unsafe-first-match
pip install --no-deps -e lenskit -e lenskit-hpf
- name: πŸ” Inspect environment
run: |
python -m lenskit.util.envcheck
Expand Down
2 changes: 1 addition & 1 deletion lkdev/workflows/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def jobs_test_matrix() -> dict[str, GHJob]:
"HPF bridge tests on Python ${{matrix.python}}",
packages=["lenskit-hpf"],
matrix={"python": PYTHONS},
env="vanilla",
env="conda",
)
),
"eval-tests": test_eval_job(),
Expand Down

0 comments on commit f06211d

Please sign in to comment.