+ if [ ! -f data/country_osm_grid.sql.gz ]; then
+ wget --no-verbose -O data/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz
+ fi
+ cd ..
+ tar czf nominatim-src.tar.bz2 Nominatim
+ mv nominatim-src.tar.bz2 Nominatim
+
+ - name: 'Upload Artifact'
+ uses: actions/upload-artifact@v3
+ with:
+ name: full-source
+ path: nominatim-src.tar.bz2
+ retention-days: 1
+
+ tests:
+ needs: create-archive
+ strategy:
+ matrix:
+ flavour: [oldstuff, "ubuntu-20", "ubuntu-22"]
+ include:
+ - flavour: oldstuff
+ ubuntu: 20
+ postgresql: '9.6'
+ postgis: '2.5'
+ php: '7.3'
+ lua: '5.1'
+ - flavour: ubuntu-20
+ ubuntu: 20
+ postgresql: 13
+ postgis: 3
+ php: '7.4'
+ lua: '5.3'
+ - flavour: ubuntu-22
+ ubuntu: 22
+ postgresql: 15
+ postgis: 3
+ php: '8.1'
+ lua: '5.3'
+
+ runs-on: ubuntu-${{ matrix.ubuntu }}.04
+
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: full-source
+
+ - name: Unpack Nominatim
+ run: tar xf nominatim-src.tar.bz2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ tools: phpunit:9, phpcs, composer
+ ini-values: opcache.jit=disable
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: 3.7
+ if: matrix.flavour == 'oldstuff'
+
+ - uses: ./Nominatim/.github/actions/setup-postgresql
+ with:
+ postgresql-version: ${{ matrix.postgresql }}
+ postgis-version: ${{ matrix.postgis }}
+
+ - uses: ./Nominatim/.github/actions/build-nominatim
+ with:
+ flavour: ${{ matrix.flavour }}
+ lua: ${{ matrix.lua }}
+
+ - name: Install test prerequsites (behave from apt)
+ run: sudo apt-get install -y -qq python3-behave
+ if: matrix.flavour == 'ubuntu-20'
+
+ - name: Install test prerequsites (behave from pip)
+ run: pip3 install behave==1.2.6
+ if: (matrix.flavour == 'oldstuff') || (matrix.flavour == 'ubuntu-22')
+
+ - name: Install test prerequsites (from apt for Ununtu 2x)
+ run: sudo apt-get install -y -qq python3-pytest python3-pytest-asyncio uvicorn
+ if: matrix.flavour != 'oldstuff'
+
+ - name: Install newer pytest-asyncio
+ run: pip3 install -U pytest-asyncio
+ if: matrix.flavour == 'ubuntu-20'
+
+ - name: Install test prerequsites (from pip for Ubuntu 18)
+ run: pip3 install pytest pytest-asyncio uvicorn
+ if: matrix.flavour == 'oldstuff'
+
+ - name: Install Python webservers
+ run: pip3 install falcon starlette
+
+ - name: Install latest pylint
+ run: pip3 install -U pylint asgi_lifespan