update env to incl modflowapi, fix pyproject version metdata #740
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI example notebooks | |
on: | |
push: | |
branches: | |
- "*" | |
- "!v[0-9]+.[0-9]+.[0-9]+*" | |
pull_request: | |
branches: | |
- "*" | |
- "!v[0-9]+.[0-9]+.[0-9]+*" | |
jobs: | |
test: | |
name: ${{ matrix.os}} py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest" ] | |
python-version: [ "3.10"] | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
- name: Setup gfortran | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: gcc | |
version: 11 | |
- name: Set environment variables | |
run: | | |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
echo "SETUPTOOLS_ENABLE_FEATURES=legacy-editable" >> $GITHUB_ENV | |
- name: Setup micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
cache-environment: true | |
cache-downloads: true | |
- name: Install error reporter | |
run: | | |
pip install pytest-github-actions-annotate-failures | |
- name: Install dependencies and this package | |
run: | | |
pip install -e . | |
- name: Version info | |
run: | | |
echo ------- | |
conda info -a | |
echo ------- | |
conda list | |
echo ------- | |
pip -V | |
echo ------- | |
pip list | |
- name: Import pywatershed | |
run: | | |
python -c "import pywatershed" | |
- name: Get GIS files for tests | |
run: | | |
python pywatershed/utils/gis_files.py | |
- name: Get additional domain files for notebooks | |
run: | | |
python pywatershed/utils/addtl_domain_files.py | |
- name: Run tests | |
working-directory: autotest_exs | |
run: | | |
pytest -s -vv --durations=0 |