Skip to content

Commit

Permalink
CI: Use conda-incubator/setup-miniconda@v3 action
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed May 10, 2024
1 parent 13a3a99 commit c36c184
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ jobs:
persist-credentials: false

- name: Setup Conda
uses: s-weigand/setup-conda@v1
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: docs
python-version: '3.10'
conda-channels: conda-forge
channels: conda-forge
channel-priority: strict

- 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 rasterio xarray scipy pyproj pandoc
source activate docs
conda install rasterio xarray scipy pyproj pandoc
python -m pip install -e .[all]
python -m pip install -r requirements/doc.txt
sphinx-build -b html docs/ docs/_build/
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,27 +105,26 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Conda
uses: s-weigand/setup-conda@v1
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: ${{ matrix.python-version }}
conda-channels: conda-forge
channels: conda-forge
channel-priority: strict

- name: Install Env
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
export INSTALL_DEPS='python=${{ matrix.python-version }} rasterio=${{ matrix.rasterio-version }} xarray=${{ matrix.xarray-version }} pyproj netcdf4 dask pandoc'
export INSTALL_DEPS='rasterio=${{ matrix.rasterio-version }} xarray=${{ matrix.xarray-version }} pyproj netcdf4 dask pandoc'
[ "${{ matrix.run-with-scipy }}" = "YES" ] && export INSTALL_DEPS="${INSTALL_DEPS} scipy"
conda create -n test $INSTALL_DEPS
conda install $INSTALL_DEPS
source activate test
python -m pip install -e .[all]
python -m pip install -r requirements/dev.txt
- name: Check and Log Environment
shell: bash
run: |
source activate test
python -V
python -c "import rioxarray; rioxarray.show_versions();"
conda info
Expand All @@ -134,27 +133,23 @@ jobs:
if: matrix.python-version == '3.10'
shell: bash
run: |
source activate test
pylint rioxarray/
- name: mypy
shell: bash
if: matrix.python-version == '3.10'
run: |
source activate test
mypy rioxarray/
- name: Test
shell: bash
run: |
source activate test
pytest --cov-report term-missing --cov=rioxarray --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/
- uses: codecov/codecov-action@v4
Expand All @@ -168,18 +163,17 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Conda
uses: s-weigand/setup-conda@v1
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: '3.10'
conda-channels: conda-forge
channels: conda-forge
channel-priority: strict

- name: Install Env
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=3.10 proj libgdal cython netcdf4
source activate test
conda install proj libgdal cython netcdf4
python -m pip install \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--no-deps --pre --upgrade \
Expand All @@ -198,13 +192,11 @@ jobs:
- name: Check and Log Environment
shell: bash
run: |
source activate test
python -V
python -c "import rioxarray; rioxarray.show_versions();"
conda info
- name: Test
shell: bash
run: |
source activate test
pytest --cov-report term-missing --cov=rioxarray --cov-report xml

0 comments on commit c36c184

Please sign in to comment.