Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache mamba environment #25

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Fail demo

on:
push:
branches: [main]
pull_request:
branches: ['*']

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

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
environment-file: ci/requirements-latest.yml
- run: mamba list
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
12 changes: 5 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,12 @@ 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 }}
init-shell: bash
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
Loading