Skip to content

Commit

Permalink
fix gdal workflow?
Browse files Browse the repository at this point in the history
  • Loading branch information
philiporlando committed Dec 31, 2023
1 parent e18700a commit bf14486
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
# Use Docker container to avoid GDAL dependency issues
container:
image: osgeo/gdal:ubuntu-small-latest

steps:
- uses: actions/checkout@v2

Expand All @@ -40,32 +41,25 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

# Install system dependencies for GDAL
- name: Install system dependencies for GDAL
run: |
sudo apt-get update
sudo apt-get install -y libgdal-dev gdal-bin
# Set GDAL environment variables
- name: Set GDAL environment variables
run: |
echo "GDAL_CONFIG=$(which gdal-config)" >> $GITHUB_ENV
echo "GDAL_VERSION=$(gdal-config --version)" >> $GITHUB_ENV
# Cache your project dependencies
# Cache your project dependencies. This caches the virtual environment
# to speed up builds by caching the dependencies
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

# Install dependencies with Poetry, avoiding caching of the project itself
# The `if` statement ensures this only runs on a cache miss
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

# Install the project using Poetry to fully-exercise pyproject.toml
# This is necessary for projects that need to be installed, such as
# Python packages
- run: poetry install --no-interaction

# Run tests with pytest as configured in pyproject.toml
# This assumes that your pytest configuration is located in pyproject.toml
- run: poetry run pytest

0 comments on commit bf14486

Please sign in to comment.