Skip to content

Commit

Permalink
use micromamba for commit.yml tests (workaround pyzmq issue with py312)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Nov 13, 2023
1 parent 7631f4b commit df923fe
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install .
pip install ".[test, optional]"
environment-file: etc/environment.yml
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
init-shell: >-
bash
powershell
- name: Install FloPy
run: pip install .

- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: |
pip install --upgrade pip
pip install .
pip install ".[test,optional]"
pip install ".[test, optional]"
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1
Expand Down Expand Up @@ -164,18 +164,20 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install .
pip install ".[test,optional]"
environment-file: etc/environment.yml
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
init-shell: >-
bash
powershell
- name: Install FloPy
run: pip install .

- name: Install Modflow-related executables
uses: modflowpy/install-modflow-action@v1
Expand All @@ -191,11 +193,7 @@ jobs:
- name: Run tests
working-directory: autotest
run: |
m="not example and not regression"
if [[ "${{ matrix.python-version}}" == "3.12" ]]; then
m="$m and not generation"
fi
pytest -v -m="$m" -n=auto --cov=flopy --cov-append --cov-report=xml --durations=0 --keep-failed=.failed --dist loadfile
pytest -v -m="not example and not regression" -n=auto --cov=flopy --cov-append --cov-report=xml --durations=0 --keep-failed=.failed --dist loadfile
coverage report
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
uses: actions/checkout@v4

- name: Setup Micromamba
if: runner.os == 'Windows'
uses: mamba-org/setup-micromamba@v1
with:
environment-file: etc/environment.yml
Expand Down
2 changes: 2 additions & 0 deletions etc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: flopy
channels:
- conda-forge
dependencies:
- pip

# required
- python>=3.8
- numpy>=1.15.0
Expand Down

0 comments on commit df923fe

Please sign in to comment.