Skip to content

Commit 72d1981

Browse files
committed
use setup-micromamba
1 parent 31615d7 commit 72d1981

3 files changed

Lines changed: 35 additions & 39 deletions

File tree

.github/workflows/deploy-docs.yml

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

1616
- name: Setup Micromamba
17-
uses: mamba-org/provision-with-micromamba@v16
17+
uses: mamba-org/setup-micromamba@v1
1818
with:
19-
environment-file: false
19+
environment-name: TEST
20+
init-shell: bash
21+
create-args: >-
22+
python=3 numpy --file requirements-dev.txt --channel conda-forge
2023
21-
- name: Create environment
24+
- name: Install gsw
2225
shell: bash -l {0}
23-
run: >
24-
micromamba create --name TEST python=3 numpy --file requirements-dev.txt --channel conda-forge
25-
&& micromamba activate TEST
26-
&& pip install -e . --no-deps --force-reinstall
26+
run: |
27+
python -m pip install -e . --no-deps --force-reinstall
2728
2829
- name: Build documentation
2930
shell: bash -l {0}
30-
run: |
31-
micromamba activate TEST
31+
run: >
3232
set -e
33-
pushd docs
34-
make clean html linkcheck
35-
popd
33+
&& pushd docs
34+
&& make clean html linkcheck
35+
&& popd
3636
3737
- name: GitHub Pages action
38-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
38+
if: success() && github.event_name == 'release'
3939
uses: peaceiris/actions-gh-pages@v3
4040
with:
4141
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tarball-tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,16 @@ jobs:
1212
- uses: actions/checkout@v3
1313

1414
- name: Setup Micromamba
15-
uses: mamba-org/provision-with-micromamba@v16
15+
uses: mamba-org/setup-micromamba@v1
1616
with:
17-
environment-file: false
18-
19-
- name: Create environment
20-
shell: bash -l {0}
21-
run: >
22-
micromamba create --name TEST python=3 python-build numpy --file requirements-dev.txt --channel conda-forge
23-
&& micromamba activate TEST
17+
environment-name: TEST
18+
init-shell: bash
19+
create-args: >-
20+
python=3 python-build numpy --file requirements-dev.txt --channel conda-forge
2421
2522
- name: Tarball
2623
shell: bash -l {0}
2724
run: >
28-
micromamba activate TEST
29-
&& python -m build --skip-dependency-check --sdist --wheel .
25+
python -m build --skip-dependency-check --sdist --wheel .
3026
&& check-manifest --verbose
3127
&& twine check dist/*

.github/workflows/tests.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.9", "3.10", "3.11"]
13+
python-version: ["3.9", "3.10", "3.11"]
1414
os: [windows-latest, ubuntu-latest, macos-latest]
1515
# Oldest one based on NEP-29 and latest one.
1616
# See https://numpy.org/neps/nep-0029-deprecation_policy.html
17-
numpy-version: ["1.21", "1.23"]
17+
numpy-version: ["1.22", "1.25"]
1818
exclude:
1919
- python-version: "3.11"
20-
numpy-version: "1.21"
20+
numpy-version: "1.22"
2121
fail-fast: false
2222

2323
steps:
2424
- uses: actions/checkout@v3
2525

26-
- name: Setup Micromamba
27-
uses: mamba-org/provision-with-micromamba@v16
26+
- name: Setup Micromamba Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }}
27+
uses: mamba-org/setup-micromamba@v1
2828
with:
29-
environment-file: false
29+
environment-name: TEST
30+
init-shell: bash
31+
create-args: >-
32+
python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge
3033
31-
- name: Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }}
34+
- name: Install gsw
3235
shell: bash -l {0}
33-
run: >
34-
micromamba create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge
35-
&& micromamba activate TEST
36-
&& python -m pip install -e . --no-deps --no-build-isolation --force-reinstall
36+
run: |
37+
python -m pip install -e . --no-deps --force-reinstall
3738
3839
- name: Debug
3940
shell: bash -l {0}
40-
run: >
41-
micromamba activate TEST
42-
&& python -c "import numpy; print(f'Running numpy {numpy.__version__}')"
41+
run: |
42+
python -c "import numpy; print(f'Running numpy {numpy.__version__}')"
4343
4444
- name: Tests
4545
shell: bash -l {0}
46-
run: >
46+
run: |
4747
micromamba activate TEST
48-
&& pytest -s -rxs -v gsw/tests
48+
pytest -s -rxs -v gsw/tests

0 commit comments

Comments
 (0)