3 on: [ push, pull_request ]
19 - uses: actions/checkout@v2
24 uses: shivammathur/setup-php@v2
32 echo "::set-output name=date::$(/bin/date -u "+%Y%W")"
35 - uses: actions/cache@v2
38 data/country_osm_grid.sql.gz
40 key: nominatim-data-${{ steps.get-date.outputs.date }}
42 - uses: ./.github/actions/setup-postgresql
44 postgresql-version: ${{ matrix.postgresql }}
45 postgis-version: ${{ matrix.postgis }}
46 - uses: ./.github/actions/build-nominatim
48 - name: Install test prerequsites
49 run: sudo apt-get install -y -qq php-codesniffer pylint python3-pytest python3-behave
52 run: phpcs --report-width=120 .
54 - name: Python linting
55 run: pylint --extension-pkg-whitelist=osmium nominatim
57 - name: PHP unit tests
59 working-directory: test/php
61 - name: Python unit tests
62 run: py.test-3 test/python
65 run: behave -DREMOVE_TEMPLATE=1 --format=progress3
66 working-directory: test/bdd
72 - uses: actions/checkout@v2
79 echo "::set-output name=date::$(/bin/date -u "+%Y%W")"
82 - uses: actions/cache@v2
85 data/country_osm_grid.sql.gz
87 key: nominatim-data-${{ steps.get-date.outputs.date }}
89 - uses: ./.github/actions/setup-postgresql
91 postgresql-version: 13
93 - uses: ./.github/actions/build-nominatim
95 - name: Download import data
97 if [ ! -f monaco-latest.osm.pbf ]; then
98 wget --no-verbose https://download.geofabrik.de/europe/monaco-latest.osm.pbf
106 ../build/nominatim import --osm-file ../monaco-latest.osm.pbf
109 - name: Import special phrases
110 run: ../build/nominatim special-phrases --from-wiki | psql -d nominatim
111 working-directory: data-env
114 run: ../build/nominatim check-database
115 working-directory: data-env
119 ../build/nominatim replication --init
120 ../build/nominatim replication --once
121 working-directory: data-env
123 - name: Run reverse-only import
125 echo 'NOMINATIM_DATABASE_DSN="pgsql:dbname=reverse"' > .env
126 ../build/nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only
127 working-directory: data-env