From 1869751208e9ca08c2cea87f6fef8362f3c67d95 Mon Sep 17 00:00:00 2001 From: "Alan D. Snow" Date: Tue, 25 Jun 2024 14:21:17 -0500 Subject: [PATCH] CI: Add latest dependencies test workflow (#174) --- .github/workflows/tests.yaml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ac504b3..6618b2d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -84,3 +84,55 @@ jobs: micromamba run -n test sphinx-build -b html docs/ docs/_build/ - uses: codecov/codecov-action@v4 + + + test_latest: + needs: linting + name: Test latest dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Conda + uses: mamba-org/setup-micromamba@v1 + with: + init-shell: bash + environment-name: test + create-args: >- + python=3.10 + proj + libgdal + cython + netcdf4 + + - name: Install Env + shell: bash + run: | + micromamba run -n test python -m pip install \ + --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ + --no-deps --pre --upgrade \ + numpy \ + pandas \ + scipy; + micromamba run -n test python -m pip install --upgrade \ + git+https://github.com/geopandas/pyogrio.git@main \ + git+https://github.com/rasterio/rasterio.git@main \ + git+https://github.com/pyproj4/pyproj.git@main \ + git+https://github.com/geopandas/geopandas.git@main \ + git+https://github.com/pydata/xarray.git@main \ + git+https://github.com/opendatacube/odc-geo.git@develop \ + git+https://github.com/corteva/rioxarray.git@master; + micromamba run -n test python -m pip install -e .[all] + micromamba run -n test python -m pip install -r requirements/test.txt + + - name: Check and Log Environment + shell: bash + run: | + micromamba run -n test python -V + micromamba run -n test python -c "import geocube; geocube.show_versions();" + micromamba info + + - name: Test + shell: bash + run: | + micromamba run -n test pytest --cov-report term-missing --cov=geocube --cov-report xml