Skip to content

Commit 60ae13a

Browse files
committed
feat(ci): micromamba
1 parent 13cc21d commit 60ae13a

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,28 @@ jobs:
1616
runs-on: ubuntu-latest
1717
defaults:
1818
run:
19-
shell: bash -el {0} # setup-miniconda requires bash
19+
shell: bash -leo pipefail {0} # required by setup-micromamba
2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Setup conda
23-
uses: deargen/workflows/actions/setup-conda-and-uv@master
24-
- name: Cache Conda environment
25-
id: cache-conda
22+
- name: Setup micromamba and uv
23+
uses: deargen/workflows/actions/setup-micromamba-and-uv@master
24+
- name: Cache Micromamba environment
25+
id: cache-micromamba
2626
uses: actions/cache@v4
2727
env:
28-
cache-name: cache-conda
28+
cache-name: cache-micromamba
2929
with:
30-
path: ~/miniconda3/envs/test
31-
key: ${{ runner.os }}-conda-${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}
30+
path: ~/micromamba/envs/test
31+
key: ${{ runner.os }}-micromamba-${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}-${{ hashFiles('.github/workflows/tests.yml') }}
3232
# restore-keys: |
33-
# ${{ runner.os }}-conda-${{ env.cache-name }}-
34-
# ${{ runner.os }}-conda-
33+
# ${{ runner.os }}-micromamba-${{ env.cache-name }}-
34+
# ${{ runner.os }}-micromamba-
3535
# ${{ runner.os }}-
36-
- if: steps.cache-conda.outputs.cache-hit == 'true'
37-
run: echo 'conda cache hit!'
36+
- if: steps.cache-micromamba.outputs.cache-hit == 'true'
37+
run: echo 'micromamba cache hit!'
3838
- name: Install dependencies
39-
if: steps.cache-conda.outputs.cache-hit != 'true'
39+
if: steps.cache-micromamba.outputs.cache-hit != 'true'
4040
run: |
41-
# python -m pip install --upgrade pip
4241
uv pip install -r deps/lock/x86_64-manylinux_2_28/requirements_dev.txt
4342
uv pip install -e .
4443
- name: Run pytest
@@ -48,29 +47,28 @@ jobs:
4847
runs-on: ubuntu-latest
4948
defaults:
5049
run:
51-
shell: bash -el {0} # setup-miniconda requires bash
50+
shell: bash -leo pipefail {0} # required by setup-micromamba
5251
steps:
5352
- uses: actions/checkout@v4
54-
- name: Setup conda
55-
uses: deargen/workflows/actions/setup-conda-and-uv@master
56-
- name: Cache Conda environment
57-
id: cache-conda
53+
- name: Setup micromamba and uv
54+
uses: deargen/workflows/actions/setup-micromamba-and-uv@master
55+
- name: Cache Micromamba environment
56+
id: cache-micromamba
5857
uses: actions/cache@v4
5958
env:
60-
cache-name: cache-conda
59+
cache-name: cache-micromamba
6160
with:
62-
path: ~/miniconda3/envs/test
63-
key: ${{ runner.os }}-conda-${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}
61+
path: ~/micromamba/envs/test
62+
key: ${{ runner.os }}-micromamba-${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}-${{ hashFiles('.github/workflows/tests.yml') }}
6463
# restore-keys: |
65-
# ${{ runner.os }}-conda-${{ env.cache-name }}-
66-
# ${{ runner.os }}-conda-
64+
# ${{ runner.os }}-micromamba-${{ env.cache-name }}-
65+
# ${{ runner.os }}-micromamba-
6766
# ${{ runner.os }}-
68-
- if: steps.cache-conda.outputs.cache-hit == 'true'
69-
run: echo 'conda cache hit!'
67+
- if: steps.cache-micromamba.outputs.cache-hit == 'true'
68+
run: echo 'micromamba cache hit!'
7069
- name: Install dependencies
71-
if: steps.cache-conda.outputs.cache-hit != 'true'
70+
if: steps.cache-micromamba.outputs.cache-hit != 'true'
7271
run: |
73-
# python -m pip install --upgrade pip
7472
uv pip install -r deps/lock/x86_64-manylinux_2_28/requirements_dev.txt
7573
uv pip install -e .
7674
- name: Run doctest

0 commit comments

Comments
 (0)