Skip to content

Commit

Permalink
Cache mamba environment
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Jan 11, 2024
1 parent 67fa69b commit 520c18b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

defaults:
run:
shell: bash -l {0}
shell: bash -leo pipefail {0}

jobs:
build:
Expand All @@ -18,14 +18,11 @@ jobs:
uses: actions/checkout@v4

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: 3.8
init-shell: bash
environment-file: ci/requirements-docs.yml
activate-environment: TEMPLATE-docs
cache-environment: true

- name: Show conda options
run: conda config --show
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

defaults:
run:
shell: bash -l {0}
shell: bash -leo pipefail {0}

jobs:
build:
Expand Down Expand Up @@ -52,14 +52,11 @@ jobs:
fetch-depth: 0

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/requirements-${{ matrix.requirements }}.yml
activate-environment: TEMPLATE
create-args: python=${{ matrix.python-version }}
cache-environment: true

- name: Show conda options
run: conda config --show
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ github. It includes:
absolufy-imports and mypy, encapsulated by pre-commit
- Sphinx documentation framework
- Integration with github workflows, codecov.io, and readthedocs
- CI tests against multiple versions of Python (Anaconda distribution) and on multiple
- Cached conda environments
- CI tests against multiple versions of Python and on multiple
OSs (Linux, Windows, and MacOS)
- Explicit tests for minimum supported dependencies versions
- Automated versioning with setuptools-scm
Expand Down

0 comments on commit 520c18b

Please sign in to comment.