3 on: [ push, pull_request ]
19 - uses: actions/checkout@v2
25 uses: shivammathur/setup-php@v2
33 echo "::set-output name=date::$(/bin/date -u "+%Y%W")"
36 - uses: actions/cache@v2
40 key: nominatim-country-data-${{ steps.get-date.outputs.date }}
42 - uses: ./Nominatim/.github/actions/setup-postgresql
44 postgresql-version: ${{ matrix.postgresql }}
45 postgis-version: ${{ matrix.postgis }}
46 - uses: ./Nominatim/.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 .
53 working-directory: Nominatim
55 - name: Python linting
56 run: pylint --extension-pkg-whitelist=osmium nominatim
57 working-directory: Nominatim
59 - name: PHP unit tests
61 working-directory: Nominatim/test/php
63 - name: Python unit tests
64 run: py.test-3 test/python
65 working-directory: Nominatim
68 run: behave -DREMOVE_TEMPLATE=1 -DBUILDDIR=$GITHUB_WORKSPACE/build --format=progress3
69 working-directory: Nominatim/test/bdd
75 - uses: actions/checkout@v2
83 echo "::set-output name=date::$(/bin/date -u "+%Y%W")"
86 - uses: actions/cache@v2
90 key: nominatim-country-data-${{ steps.get-date.outputs.date }}
92 - uses: actions/cache@v2
96 key: nominatim-test-data-${{ steps.get-date.outputs.date }}
98 - uses: ./Nominatim/.github/actions/setup-postgresql
100 postgresql-version: 13
102 - uses: ./Nominatim/.github/actions/build-nominatim
104 - name: Clean installation
105 run: rm -rf Nominatim build
108 - name: Prepare import environment
110 if [ ! -f monaco-latest.osm.pbf ]; then
111 wget --no-verbose https://download.geofabrik.de/europe/monaco-latest.osm.pbf
118 run: nominatim import --osm-file ../monaco-latest.osm.pbf
120 working-directory: data-env
122 - name: Import special phrases
123 run: nominatim special-phrases --import-from-wiki
124 working-directory: data-env
127 run: nominatim admin --check-database
128 working-directory: data-env
132 nominatim replication --init
133 nominatim replication --once
134 working-directory: data-env
136 - name: Run reverse-only import
137 run : nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only
138 working-directory: data-env
140 NOMINATIM_DATABASE_DSN: pgsql:dbname=reverse