diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 667cbbb51..58592af5a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -24,15 +24,24 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + set -e python -m pip install --upgrade pip - pip install pytest wheel numpy - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable + python -m pip install pytest wheel numpy + + sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable sudo apt-get update - sudo apt-get install gdal-bin python3-gdal - sudo apt-get install libgdal-dev - pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal" - sudo apt-get install libspatialindex-dev - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + sudo apt-get install -y gdal-bin libgdal-dev python3-gdal libspatialindex-dev + + export CFLAGS="$(gdal-config --cflags)" + export LDFLAGS="$(gdal-config --libs)" + export CPATH="$(gdal-config --cflags | sed 's/-I//g' | awk '{print $1}'):$CPATH" || true + export CPLUS_INCLUDE_PATH="$(gdal-config --cflags | sed 's/-I//g' | awk '{print $1}'):$CPLUS_INCLUDE_PATH" || true + + python -m pip install "GDAL==$(gdal-config --version)" || \ + python -m pip install --no-binary GDAL "GDAL==$(gdal-config --version)" + + # Install repo requirements + if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi - name: Integration tests with pytest run: | pytest -v ./tests/test_integration.py --html=mobility-catalogs-integration-tests-report.html --self-contained-html diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index fc3722b5f..cf871bbbb 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -24,15 +24,24 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + set -e python -m pip install --upgrade pip - pip install pytest wheel numpy + python -m pip install pytest wheel numpy + sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo apt-get update - sudo apt-get install gdal-bin python3-gdal - sudo apt-get install libgdal-dev - pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal" - sudo apt-get install libspatialindex-dev - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + sudo apt-get install -y gdal-bin libgdal-dev python3-gdal libspatialindex-dev + + export CFLAGS="$(gdal-config --cflags)" + export LDFLAGS="$(gdal-config --libs)" + export CPATH="$(gdal-config --cflags | sed 's/-I//g' | awk '{print $1}'):$CPATH" || true + export CPLUS_INCLUDE_PATH="$(gdal-config --cflags | sed 's/-I//g' | awk '{print $1}'):$CPLUS_INCLUDE_PATH" || true + + python -m pip install "GDAL==$(gdal-config --version)" || \ + python -m pip install --no-binary GDAL "GDAL==$(gdal-config --version)" + + # Install repo requirements + if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi - name: Unit tests with pytest run: | pytest --ignore=./tests/test_integration.py --html=mobility-catalogs-unit-tests-report.html --self-contained-html diff --git a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-sa-2849.json b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-sa-2849.json index 0ed547214..a4c0dd26c 100644 --- a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-sa-2849.json +++ b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-sa-2849.json @@ -5,6 +5,7 @@ "sa" ], "provider": "Urban Mobility Center - Sofia Traffic", + "is_official": "True", "static_reference": [ "2848" ], diff --git a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-tu-2850.json b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-tu-2850.json index cf503a84c..dfef2c448 100644 --- a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-tu-2850.json +++ b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-tu-2850.json @@ -5,6 +5,7 @@ "tu" ], "provider": "Urban Mobility Center - Sofia Traffic", + "is_official": "True", "static_reference": [ "2848" ], diff --git a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-vp-2847.json b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-vp-2847.json index 31d167ca8..3e35affd4 100644 --- a/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-vp-2847.json +++ b/catalogs/sources/gtfs/realtime/bg-sofia-city-gtfs-rt-vp-2847.json @@ -5,7 +5,8 @@ "vp" ], "provider": "Urban Mobility Center - Sofia Traffic", - "static_reference": [ + "is_official": "True", + "static_reference": [ "2848" ], "urls": {