Use awalsh128/cache-apt-pkgs-action action (#1066)

Install libsqlite3-mod-spatialite for Github CI

Update sqlite tests
This commit is contained in:
Benjamin Webb
2022-12-08 16:45:36 -05:00
committed by GitHub
parent fffed87f2d
commit 29970e29c3
2 changed files with 11 additions and 4 deletions
+6 -1
View File
@@ -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
+5 -3
View File
@@ -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