Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Use mamba-org/setup-micromamba@v1 action #173

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,26 @@ jobs:
persist-credentials: false

- name: Setup Conda
uses: s-weigand/setup-conda@v1
uses: mamba-org/setup-micromamba@v1
with:
python-version: '3.10'
conda-channels: conda-forge
init-shell: bash
environment-name: docs
create-args: >-
python=3.10
geopandas
odc-geo
pandoc
rasterio
rioxarray
scipy
xarray

- name: Install and Build
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n docs python=3.10 odc-geo geopandas rasterio scipy rioxarray xarray pandoc
source activate docs
python -m pip install -r requirements/doc.txt
python -m pip install -e .
sphinx-build -b html docs/ docs/_build/
micromamba run -n docs python -m pip install -r requirements/doc.txt
micromamba run -n docs python -m pip install -e .
micromamba run -n docs sphinx-build -b html docs/ docs/_build/

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
43 changes: 22 additions & 21 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,52 +34,53 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Conda
uses: s-weigand/setup-conda@v1
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
conda-channels: conda-forge
init-shell: bash
environment-name: test
create-args: >-
python=${{ matrix.python-version }}
geopandas
netcdf4
odc-geo
pandoc
rasterio
rioxarray
scipy
xarray

- name: Install Env
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=${{ matrix.python-version }} odc-geo geopandas rasterio scipy rioxarray xarray netcdf4 pandoc
source activate test
python -m pip install -r requirements/dev.txt
python -m pip install -e .
micromamba run -n test python -m pip install -r requirements/dev.txt
micromamba run -n test python -m pip install -e .

- name: Check and Log Environment
shell: bash
run: |
source activate test
python -V
python -c "import geocube; geocube.show_versions();"
conda info
micromamba run -n test python -V
micromamba run -n test python -c "import geocube; geocube.show_versions();"
micromamba info

- name: Pylint
shell: bash
run: |
source activate test
python -m pylint geocube
micromamba run -n test python -m pylint geocube

- name: mypy
shell: bash
run: |
source activate test
python -m mypy geocube/
micromamba run -n test python -m mypy geocube/

- name: Test
shell: bash
run: |
source activate test
pytest --cov-report term-missing --cov=geocube --cov-report xml
micromamba run -n test pytest --cov-report term-missing --cov=geocube --cov-report xml

- name: Test Build docs
shell: bash
if: contains(matrix.os, 'ubuntu')
run: |
source activate test
sphinx-build -b html docs/ docs/_build/
micromamba run -n test sphinx-build -b html docs/ docs/_build/

- uses: codecov/codecov-action@v4
Loading