CI: miniconda bandaid. app.py: fix s1 and box logic #4
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 via setup-miniconda) | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Miniconda (with conda-forge channel) | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| python-version: "3.11" | |
| channels: "conda-forge,defaults" | |
| auto-update-conda: true | |
| # do not pin mamba-version to avoid "package not found" errors | |
| - name: Create CI conda env with mamba | |
| shell: bash -l {0} | |
| run: | | |
| # create an environment with mamba (conda-forge) | |
| mamba create -n ci-env -y -c conda-forge \ | |
| python=3.11 ipywidgets ipyleaflet pytest ruff pip \ | |
| numpy pandas xarray rioxarray rasterio geopandas shapely matplotlib | |
| source "$(conda info --base)/etc/profile.d/conda.sh" | |
| conda activate ci-env | |
| python -m pip install -e . | |
| - name: Lint (ruff) | |
| shell: bash -l {0} | |
| run: | | |
| source "$(conda info --base)/etc/profile.d/conda.sh" | |
| conda activate ci-env | |
| python -m ruff check . | |
| - name: Run tests (pytest) | |
| shell: bash -l {0} | |
| run: | | |
| source "$(conda info --base)/etc/profile.d/conda.sh" | |
| conda activate ci-env | |
| pytest -q |