diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 42b7ccf..a58994e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }} + diff --git a/ci/requirements/base.txt b/ci/requirements/base.txt new file mode 100644 index 0000000..c58522c --- /dev/null +++ b/ci/requirements/base.txt @@ -0,0 +1,11 @@ +coverage +dask +matplotlib +networkx +numba>=0.56 +numpy +opt_einsum +pytest +pytest-cov +scipy +sparse diff --git a/ci/requirements/jax.txt b/ci/requirements/jax.txt new file mode 100644 index 0000000..9e7941a --- /dev/null +++ b/ci/requirements/jax.txt @@ -0,0 +1,7 @@ +coverage +jax +matplotlib +numpy +opt_einsum +pytest +pytest-cov diff --git a/ci/requirements/py-base.yml b/ci/requirements/py-base.yml deleted file mode 100644 index c6286e0..0000000 --- a/ci/requirements/py-base.yml +++ /dev/null @@ -1,15 +0,0 @@ -channels: - - defaults - - conda-forge -dependencies: - - opt_einsum - - numpy - - dask - - scipy - - sparse - - numba>=0.56 - - matplotlib - - networkx - - pytest - - pytest-cov - - coverage diff --git a/ci/requirements/py-jax.yml b/ci/requirements/py-jax.yml deleted file mode 100644 index 9ff0495..0000000 --- a/ci/requirements/py-jax.yml +++ /dev/null @@ -1,13 +0,0 @@ -channels: - - defaults - - conda-forge -dependencies: - - opt_einsum - - numpy - - matplotlib - - pytest - - pytest-cov - - coverage - - pip - - pip: - - jax[cpu] diff --git a/ci/requirements/py-tensorflow.yml b/ci/requirements/py-tensorflow.yml deleted file mode 100644 index f0ea80e..0000000 --- a/ci/requirements/py-tensorflow.yml +++ /dev/null @@ -1,15 +0,0 @@ -channels: - - defaults - - conda-forge -dependencies: - - opt_einsum - - numpy - - scipy - - matplotlib - - networkx - - pytest - - pytest-cov - - coverage - - pip - - pip: - - tensorflow diff --git a/ci/requirements/py-torch.yml b/ci/requirements/py-torch.yml deleted file mode 100644 index d13b2aa..0000000 --- a/ci/requirements/py-torch.yml +++ /dev/null @@ -1,15 +0,0 @@ -channels: - - pytorch - - defaults - - conda-forge -dependencies: - - pytorch - - cpuonly - - opt_einsum - - numpy - - scipy - - matplotlib - - networkx - - pytest - - pytest-cov - - coverage diff --git a/ci/requirements/tensorflow.txt b/ci/requirements/tensorflow.txt new file mode 100644 index 0000000..b839d5f --- /dev/null +++ b/ci/requirements/tensorflow.txt @@ -0,0 +1,9 @@ +coverage +matplotlib +networkx +numpy +opt_einsum +pytest +pytest-cov +scipy +tensorflow diff --git a/ci/requirements/torch.txt b/ci/requirements/torch.txt new file mode 100644 index 0000000..68951a2 --- /dev/null +++ b/ci/requirements/torch.txt @@ -0,0 +1,11 @@ +coverage +matplotlib +networkx +numpy +opt_einsum +pytest +pytest-cov +scipy + +--index-url https://download.pytorch.org/whl/cpu +torch \ No newline at end of file