Skip to content

Commit 609880a

Browse files
authored
Merge pull request #1767 from Conengmo/micromamba-setup-action
Use mamba-org / setup-micromamba action
2 parents 76647fe + a751381 commit 609880a

7 files changed

Lines changed: 78 additions & 71 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,24 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- name: Setup Micromamba
19-
uses: mamba-org/provision-with-micromamba@v15
18+
- name: Setup Micromamba env
19+
uses: mamba-org/setup-micromamba@v1
2020
with:
21-
environment-file: false
21+
environment-name: TEST
22+
create-args: >-
23+
python=3
24+
--file requirements.txt
25+
--file requirements-dev.txt
26+
cache-environment: true
2227

23-
- name: Create environment
28+
- name: Install folium from source
2429
shell: bash -l {0}
25-
run: |
26-
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
27-
micromamba activate TEST
28-
pip install -e . --no-deps --force-reinstall
30+
run: python -m pip install -e . --no-deps --force-reinstall
2931

3032
- name: Build documentation
3133
shell: bash -l {0}
3234
run: |
3335
set -e
34-
micromamba activate TEST
3536
cp examples/Quickstart.ipynb docs/quickstart.ipynb
3637
pushd docs
3738
make clean html linkcheck

.github/workflows/test_code.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v3
1616

17-
- name: Setup Micromamba
18-
uses: mamba-org/provision-with-micromamba@v15
17+
- name: Setup Micromamba env
18+
uses: mamba-org/setup-micromamba@v1
1919
with:
20-
environment-file: false
20+
environment-name: TEST
21+
create-args: >-
22+
python=${{ matrix.python-version }}
23+
--file requirements.txt
24+
--file requirements-dev.txt
25+
cache-environment: true
2126

22-
- name: Python ${{ matrix.python-version }}
27+
- name: Install folium from source
2328
shell: bash -l {0}
24-
run: |
25-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
26-
micromamba activate TEST
27-
python -m pip install -e . --no-deps --force-reinstall
29+
run: python -m pip install -e . --no-deps --force-reinstall
2830

29-
- name: Tests
31+
- name: Code tests
3032
shell: bash -l {0}
31-
run: |
32-
micromamba activate TEST
33-
python -m pytest -vv --ignore=tests/selenium
33+
run: python -m pytest -vv --ignore=tests/selenium

.github/workflows/test_code_notebooks.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Setup Micromamba
13-
uses: mamba-org/provision-with-micromamba@v15
12+
- name: Setup Micromamba env
13+
uses: mamba-org/setup-micromamba@v1
1414
with:
15-
environment-file: false
15+
environment-name: TEST
16+
create-args: >-
17+
python=3
18+
--file requirements.txt
19+
--file requirements-dev.txt
20+
cache-environment: true
1621

17-
- name: Create env
22+
- name: Install folium from source
1823
shell: bash -l {0}
19-
run: |
20-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21-
micromamba activate TEST
22-
python -m pip install -e . --no-deps --force-reinstall
24+
run: python -m pip install -e . --no-deps --force-reinstall
2325

2426
- name: Notebook tests
2527
shell: bash -l {0}
26-
run: |
27-
micromamba activate TEST
28-
python -m pytest --nbval-lax examples --ignore=examples/WmsTimeDimension.ipynb
28+
run: python -m pytest --nbval-lax examples --ignore=examples/WmsTimeDimension.ipynb

.github/workflows/test_latest_branca.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Setup Micromamba
13-
uses: mamba-org/provision-with-micromamba@v15
12+
- name: Setup Micromamba env
13+
uses: mamba-org/setup-micromamba@v1
1414
with:
15-
environment-file: false
15+
environment-name: TEST
16+
create-args: >-
17+
python=3
18+
--file requirements.txt
19+
--file requirements-dev.txt
20+
cache-environment: true
1621

17-
- name: Python 3.x
22+
- name: Install folium from source
1823
shell: bash -l {0}
19-
run: |
20-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21-
micromamba activate TEST
22-
python -m pip install -e . --no-deps --force-reinstall
24+
run: python -m pip install -e . --no-deps --force-reinstall
2325

2426
- name: Tests with latest branca
2527
shell: bash -l {0}
2628
run: |
27-
micromamba activate TEST
2829
micromamba remove branca --yes --force
2930
python -m pip install git+https://github.com/python-visualization/branca.git
3031
python -m pytest -vv --ignore=tests/selenium

.github/workflows/test_mypy.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Setup Micromamba
13-
uses: mamba-org/provision-with-micromamba@v15
12+
- name: Setup Micromamba env
13+
uses: mamba-org/setup-micromamba@v1
1414
with:
15-
environment-file: false
15+
environment-name: TEST
16+
create-args: >-
17+
python=3
18+
--file requirements.txt
19+
--file requirements-dev.txt
20+
cache-environment: true
1621

17-
- name: Create env
22+
- name: Install folium from source
1823
shell: bash -l {0}
1924
run: |
20-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21-
micromamba activate TEST
2225
python -m pip install -e . --no-deps --force-reinstall
2326
24-
- name: Selenium tests
27+
- name: Mypy test
2528
shell: bash -l {0}
2629
run: |
27-
micromamba activate TEST
2830
mypy folium

.github/workflows/test_selenium.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Setup Micromamba
13-
uses: mamba-org/provision-with-micromamba@v15
12+
- name: Setup Micromamba env
13+
uses: mamba-org/setup-micromamba@v1
1414
with:
15-
environment-file: false
15+
environment-name: TEST
16+
create-args: >-
17+
python=3
18+
--file requirements.txt
19+
--file requirements-dev.txt
20+
cache-environment: true
1621

17-
- name: Create env
22+
- name: Install folium from source
1823
shell: bash -l {0}
19-
run: |
20-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21-
micromamba activate TEST
22-
python -m pip install -e . --no-deps --force-reinstall
24+
run: python -m pip install -e . --no-deps --force-reinstall
2325

2426
- name: Selenium tests
2527
shell: bash -l {0}
26-
run: |
27-
micromamba activate TEST
28-
python -m pytest tests/selenium -vv
28+
run: python -m pytest tests/selenium -vv

.github/workflows/test_style_notebooks.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: Setup Micromamba
13-
uses: mamba-org/provision-with-micromamba@v15
12+
- name: Setup Micromamba env
13+
uses: mamba-org/setup-micromamba@v1
1414
with:
15-
environment-file: false
15+
environment-name: TEST
16+
create-args: >-
17+
python=3
18+
--file requirements.txt
19+
--file requirements-dev.txt
20+
cache-environment: true
1621

17-
- name: Create env
22+
- name: Install folium from source
1823
shell: bash -l {0}
19-
run: |
20-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
21-
micromamba activate TEST
22-
python -m pip install -e . --no-deps --force-reinstall
24+
run: python -m pip install -e . --no-deps --force-reinstall
2325

2426
- name: Notebook coding standards tests
2527
shell: bash -l {0}
26-
run: |
27-
micromamba activate TEST
28-
for fname in examples/*.ipynb; do echo $fname $(flake8-nb $fname --ignore=W391,E226,E402,W504,I100,I201,I202,E703 --max-line-length=120 --show-source --count); done
28+
run: >
29+
for fname in examples/*.ipynb;
30+
do echo $fname $(flake8-nb $fname --ignore=W391,E226,E402,W504,I100,I201,I202,E703 --max-line-length=120 --show-source --count);
31+
done

0 commit comments

Comments
 (0)