From 8728e9c2cc8a8e73b90409d2d77ecbcb789d8d5a Mon Sep 17 00:00:00 2001 From: Ryan May Date: Fri, 23 Jul 2021 16:51:07 -0600 Subject: [PATCH] CI: Fix test dependency installs This avoids installing CartoPy build dependencies unless we actually need CartoPy. --- .github/workflows/tests-pypi.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-pypi.yml b/.github/workflows/tests-pypi.yml index e8b3db8ab7a..64f8d04346e 100644 --- a/.github/workflows/tests-pypi.yml +++ b/.github/workflows/tests-pypi.yml @@ -84,13 +84,15 @@ jobs: # This installs the stuff needed to build and install Shapely and CartoPy from source. # Need to install numpy first to make CartoPy happy. - - name: Install dependencies + - name: Install CartoPy build dependencies + if: ${{ matrix.no-extras != 'No Extras' }} run: | sudo apt-get install libgeos-dev libproj-dev proj-bin - python -m pip install --upgrade pip setuptools python -m pip install --no-binary :all: shapely python -m pip install -c ci/${{ matrix.dep-versions }} numpy - python -m pip install -r ci/test_requirements.txt -c ci/${{ matrix.dep-versions }} + + - name: Install test dependencies + run: python -m pip install -r ci/test_requirements.txt -c ci/${{ matrix.dep-versions }} # This imports CartoPy to find its map data cache directory - name: Get CartoPy maps dir