Skip to content

Commit

Permalink
ci: move to uv for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Oct 21, 2024
1 parent 9acdbde commit 2ac2d1c
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 76 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,27 @@ jobs:
env: tensorflow

steps:
- uses: actions/checkout@v4

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/requirements/py-${{ matrix.env }}.yml
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true

- name: Test with pytest
run: pytest --cov=autoray tests/ --cov-report=xml tests

- name: Report to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.20"

- name: Install python
run: uv python install ${{ matrix.python-version }}

- name: Setup uv project
run: uv sync

- name: Install dependencies
run: uv pip install -r ci/requirements/${{ matrix.env }}.txt

- name: Test with pytest
run: uv run pytest --cov=autoray tests/ --cov-report=xml tests

- name: Report to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

11 changes: 11 additions & 0 deletions ci/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage
dask
matplotlib
networkx
numba>=0.56
numpy
opt_einsum
pytest
pytest-cov
scipy
sparse
7 changes: 7 additions & 0 deletions ci/requirements/jax.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
coverage
jax
matplotlib
numpy
opt_einsum
pytest
pytest-cov
15 changes: 0 additions & 15 deletions ci/requirements/py-base.yml

This file was deleted.

13 changes: 0 additions & 13 deletions ci/requirements/py-jax.yml

This file was deleted.

15 changes: 0 additions & 15 deletions ci/requirements/py-tensorflow.yml

This file was deleted.

15 changes: 0 additions & 15 deletions ci/requirements/py-torch.yml

This file was deleted.

9 changes: 9 additions & 0 deletions ci/requirements/tensorflow.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage
matplotlib
networkx
numpy
opt_einsum
pytest
pytest-cov
scipy
tensorflow
11 changes: 11 additions & 0 deletions ci/requirements/torch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage
matplotlib
networkx
numpy
opt_einsum
pytest
pytest-cov
scipy

--index-url https://download.pytorch.org/whl/cpu
torch

0 comments on commit 2ac2d1c

Please sign in to comment.