@@ -257,7 +257,11 @@ jobs:
257257 uses: deargen/workflows/actions/run-doctest@master
258258` ` `
259259
260- # ## Setup conda with cache and run pytest
260+ # ## Setup micromamba with cache and run pytest and doctest
261+
262+ > [!NOTE]
263+ > In CI, use micromamba to speed up the conda environment setup.
264+ > run `micromamba install ...` instead of `conda install ...`.
261265
262266` ` ` yaml
263267name: Tests
@@ -278,29 +282,57 @@ jobs:
278282 runs-on: ubuntu-latest
279283 defaults:
280284 run:
281- shell: bash -el {0} # setup-miniconda requires bash
285+ shell: bash -leo pipefail {0} # required by setup-micromamba
282286 steps:
283287 - uses: actions/checkout@v4
284- - name: Setup conda
285- uses: deargen/workflows/actions/setup-conda -and-uv@master
286- - name: Cache Conda environment
287- id: cache-conda
288+ - name: Setup micromamba and uv
289+ uses: deargen/workflows/actions/setup-micromamba -and-uv@master
290+ - name: Cache Micromamba environment
291+ id: cache-micromamba
288292 uses: actions/cache@v4
289293 env:
290- cache-name: cache-conda
294+ cache-name: cache-micromamba
291295 with:
292- path: ~/miniconda3 /envs/test
293- key: ${{ runner.os }}-conda -${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}
294- - if: steps.cache-conda .outputs.cache-hit == 'true'
295- run: echo 'conda cache hit!'
296+ path: ~/micromamba /envs/test
297+ key: ${{ runner.os }}-micromamba -${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}-${{ hashFiles('.github/workflows/tests.yml ') }}
298+ - if: steps.cache-micromamba .outputs.cache-hit == 'true'
299+ run: echo 'micromamba cache hit!'
296300 - name: Install dependencies
297- if: steps.cache-conda .outputs.cache-hit != 'true'
301+ if: steps.cache-micromamba .outputs.cache-hit != 'true'
298302 run: |
303+ bash scripts/install_binaries.sh
299304 uv pip install -r deps/lock/x86_64-manylinux_2_28/requirements_dev.txt
300305 uv pip install -e .
301- bash scripts/install_binaries.sh
302306 - name: Run pytest
303307 uses: deargen/workflows/actions/run-pytest@master
308+
309+ doctest:
310+ runs-on: ubuntu-latest
311+ defaults:
312+ run:
313+ shell: bash -leo pipefail {0} # required by setup-micromamba
314+ steps:
315+ - uses: actions/checkout@v4
316+ - name: Setup micromamba and uv
317+ uses: deargen/workflows/actions/setup-micromamba-and-uv@master
318+ - name: Cache Micromamba environment
319+ id: cache-micromamba
320+ uses: actions/cache@v4
321+ env:
322+ cache-name: cache-micromamba
323+ with:
324+ path: ~/micromamba/envs/test
325+ key: ${{ runner.os }}-micromamba-${{ env.cache-name }}-${{ hashFiles('deps/lock/x86_64-manylinux_2_28/requirements_dev.txt') }}-${{ hashFiles('.github/workflows/tests.yml') }}
326+ - if: steps.cache-micromamba.outputs.cache-hit == 'true'
327+ run: echo 'micromamba cache hit!'
328+ - name: Install dependencies
329+ if: steps.cache-micromamba.outputs.cache-hit != 'true'
330+ run: |
331+ bash scripts/install_binaries.sh
332+ uv pip install -r deps/lock/x86_64-manylinux_2_28/requirements_dev.txt
333+ uv pip install -e .
334+ - name: Run doctest
335+ uses: deargen/workflows/actions/run-doctest@master
304336` ` `
305337
306338# # Deploying a new version
0 commit comments