CI: mamba bandaid; add environment.yml and requirements-dev #2
This file contains hidden or 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 (conda+mamba) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| auto-activate-base: false | |
| python-version: "3.11" | |
| mamba-version: "1.4.6" | |
| - name: Create conda env with geospatial deps (mamba) | |
| run: | | |
| mamba create -n ci-env -y -c conda-forge \ | |
| python=3.11 ipywidgets ipyleaflet pytest ruff pip \ | |
| numpy pandas xarray rioxarray rasterio geopandas shapely | |
| conda activate ci-env | |
| python -m pip install -e . | |
| - name: Lint (ruff) | |
| run: | | |
| conda activate ci-env | |
| python -m ruff check . | |
| - name: Run tests | |
| run: | | |
| conda activate ci-env | |
| pytest -q |