Skip to content

Commit

Permalink
use setup-micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Jun 21, 2023
1 parent 950d909 commit 660b0a5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 41 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,26 @@ jobs:
with:
fetch-depth: 0

- name: Setup Mamba
uses: mamba-org/provision-with-micromamba@v14
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Build environment
- name: Install branca
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
python -m pip install -e . --no-deps --force-reinstall
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(python setup.py --version)

- name: Build documentation
shell: bash -l {0}
run: |
run: >
set -e
micromamba activate TEST
pushd docs
make clean html linkcheck
popd
&& pushd docs
&& make clean html linkcheck
&& popd
- name: Deploy
if: success() && github.event_name == 'release'
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
python-version: ["3.11"]
# We only run latest Python on macOS and Windows to save resources.
include:
- os: ubuntu-latest
python-version: "3.7"
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
Expand All @@ -27,20 +25,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
- name: Setup Micromamba Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Python ${{ matrix.python-version }}
- name: Install branca
shell: bash -l {0}
run: |
micromamba create --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
shell: bash -l {0}
run: |
micromamba activate TEST
python -m pytest -vv -rxs tests -m "not headless"
16 changes: 8 additions & 8 deletions .github/workflows/test_code_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
- name: Setup Micromamba Python 3
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Python 3
- name: Install branca
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall
python -m pip install -e . --no-deps --force-reinstall
- name: Notebook tests
shell: bash -l {0}
run: |
micromamba activate TEST
python -m pytest --nbval-lax examples
16 changes: 8 additions & 8 deletions .github/workflows/test_selenium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
- name: Setup Micromamba Python 3
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Python 3
- name: Install branca
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
shell: bash -l {0}
run: |
micromamba activate TEST
pytest -vv -rxs tests -m "headless"

0 comments on commit 660b0a5

Please sign in to comment.