diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb55ea5..9342143 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,6 +76,11 @@ jobs: mongodb-version: 4.4 - name: Install and run SensorThingsAPI uses: cgs-earth/sensorthings-action@v0.0.2 + - name: Install sqlite and gpkg dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libsqlite3-mod-spatialite + version: 1.0 - name: Install requirements 📦 run: | pip3 install -r requirements.txt @@ -115,7 +120,7 @@ jobs: pytest tests/test_rasterio_provider.py pytest tests/test_sensorthings_provider.py pytest tests/test_socrata_provider.py - #pytest tests/test_sqlite_geopackage_provider.py + pytest tests/test_sqlite_geopackage_provider.py pytest tests/test_tinydb_catalogue_provider.py pytest tests/test_util.py pytest tests/test_xarray_netcdf_provider.py diff --git a/tests/test_sqlite_geopackage_provider.py b/tests/test_sqlite_geopackage_provider.py index d46c0f3..3b01c39 100644 --- a/tests/test_sqlite_geopackage_provider.py +++ b/tests/test_sqlite_geopackage_provider.py @@ -38,13 +38,15 @@ import pytest from pygeoapi.provider.base import ProviderItemNotFoundError from pygeoapi.provider.sqlite import SQLiteGPKGProvider +from .util import get_test_file_path + @pytest.fixture() def config_sqlite(): return { 'name': 'SQLiteGPKG', 'type': 'feature', - 'data': './tests/data/ne_110m_admin_0_countries.sqlite', + 'data': get_test_file_path('data/ne_110m_admin_0_countries.sqlite'), 'id_field': 'ogc_fid', 'table': 'ne_110m_admin_0_countries' } @@ -55,7 +57,7 @@ def config_geopackage(): return { 'name': 'SQLiteGPKG', 'type': 'feature', - 'data': './tests/data/poi_portugal.gpkg', + 'data': get_test_file_path('data/poi_portugal.gpkg'), 'id_field': 'osm_id', 'table': 'poi_portugal' } @@ -175,4 +177,4 @@ def test_get_geopackage_skip_geometry(config_geopackage): feature_collection = p.query(skip_geometry=True) for feature in feature_collection['features']: - assert feature['geomtry'] is None + assert feature['geometry'] is None