Improve CRS support in OAMaps #4579
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '!**.md' | |
| - 'docs/**' | |
| release: | |
| types: | |
| - released | |
| jobs: | |
| main: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: '3.12' | |
| env: | |
| PYGEOAPI_CONFIG: "$(pwd)/pygeoapi-config.yml" | |
| DOCKER_API_VERSION: "1.44" | |
| services: | |
| postgres: | |
| image: postgis/postgis:14-3.2 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_DB: test | |
| POSTGRES_PASSWORD: ${{ secrets.DatabasePassword || 'postgres' }} | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: mysql | |
| MYSQL_DATABASE: test_geo_app | |
| MYSQL_USER: pygeoapi | |
| MYSQL_PASSWORD: mysql | |
| ports: | |
| - 3306:3306 | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0 | |
| ports: | |
| - 9200:9200 | |
| - 9300:9300 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: "false" | |
| ES_JAVA_OPTS: "-Xms512m -Xmx512m" | |
| opensearch: | |
| image: opensearchproject/opensearch:2.18.0 | |
| ports: | |
| - 9209:9200 | |
| env: | |
| discovery.type: single-node | |
| DISABLE_SECURITY_PLUGIN: "true" | |
| OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m" | |
| mongodb: | |
| image: mongo:8.0.4 | |
| ports: | |
| - 27017:27017 | |
| sensorthings: | |
| image: ghcr.io/cgs-earth/sensorthings-action:0.1.2 | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| steps: | |
| - name: Clear up GitHub runner diskspace | |
| run: | | |
| echo "Space before" | |
| df -h / | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /usr/share/dotnet | |
| echo "Space after" | |
| df -h / | |
| - name: Chown user | |
| run: | | |
| sudo chown -R $USER:$USER $GITHUB_WORKSPACE | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-python@v5 | |
| name: Setup Python ${{ matrix.python-version }} | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install and run Oracle | |
| run: | | |
| docker run \ | |
| -d \ | |
| --name oracledb \ | |
| -e ORACLE_PWD=oracle \ | |
| -v ${{ github.workspace }}/tests/data/oracle/init-db:/opt/oracle/scripts/startup \ | |
| -p 1521:1521 \ | |
| container-registry.oracle.com/database/express:21.3.0-xe | |
| - name: Configure sysctl limits | |
| run: | | |
| sudo swapoff -a | |
| sudo sysctl -w vm.swappiness=1 | |
| sudo sysctl -w fs.file-max=262144 | |
| sudo sysctl -w vm.max_map_count=262144 | |
| - name: Install sqlite and gpkg dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1.4.3 | |
| with: | |
| packages: libsqlite3-mod-spatialite | |
| version: 4.3.0a-6build1 | |
| - name: Use ubuntuGIS unstable ppa | |
| run: | | |
| sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
| sudo apt update | |
| sudo apt-get install gdal-bin libgdal-dev -y | |
| shell: bash | |
| # - name: Install GDAL with Python bindings | |
| # uses: awalsh128/cache-apt-pkgs-action@v1.4.3 | |
| # with: | |
| # packages: gdal-bin libgdal-dev | |
| # version: 3.11.3 | |
| - name: Install requirements 📦 | |
| run: | | |
| pip3 install setuptools | |
| pip3 install -r requirements.txt | |
| pip3 install -r requirements-admin.txt | |
| pip3 install -r requirements-starlette.txt | |
| pip3 install -r requirements-dev.txt | |
| pip3 install -r requirements-provider.txt | |
| pip3 install -r requirements-manager.txt | |
| pip3 install -r requirements-django.txt | |
| pip3 install -r requirements-pubsub.txt | |
| pip3 install . | |
| pip3 install GDAL==`gdal-config --version` | |
| - name: setup test data ⚙️ | |
| run: | | |
| python3 tests/load_oracle_data.py | |
| python3 tests/load_es_data.py tests/data/ne_110m_populated_places_simple.geojson geonameid | |
| python3 tests/load_opensearch_data.py tests/data/ne_110m_populated_places_simple.geojson geonameid | |
| python3 tests/load_mongo_data.py tests/data/ne_110m_populated_places_simple.geojson | |
| gunzip < tests/data/hotosm_bdi_waterways.sql.gz | psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test | |
| psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_data.sql | |
| psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_types_data.sql | |
| mysql -h 127.0.0.1 -P 3306 -u root -p'mysql' test_geo_app < tests/data/mysql_data.sql | |
| docker ps | |
| - name: run API tests ⚙️ | |
| run: pytest tests/api --ignore-glob='*_live.py' | |
| - name: run Formatter tests ⚙️ | |
| run: pytest tests/formatter | |
| - name: run Provider tests ⚙️ | |
| env: | |
| POSTGRESQL_PASSWORD: ${{ secrets.DatabasePassword || 'postgres' }} | |
| run: pytest tests/provider --ignore-glob='*_live.py' | |
| - name: run Manager tests ⚙️ | |
| env: | |
| POSTGRESQL_PASSWORD: ${{ secrets.DatabasePassword || 'postgres' }} | |
| run: pytest tests/manager | |
| - name: run other tests ⚙️ | |
| run: pytest tests/other --ignore-glob='*_live.py' | |
| - name: failed tests 🚩 | |
| if: ${{ failure() }} | |
| run: | | |
| pip3 list -v |