mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
actions: remove install directories before import
This ensures that any dangling references to the build or source directory are caught by the CI.
This commit is contained in:
7
.github/actions/build-nominatim/action.yml
vendored
7
.github/actions/build-nominatim/action.yml
vendored
@@ -11,13 +11,14 @@ runs:
|
|||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: |
|
run: |
|
||||||
if [ ! -f data/country_osm_grid.sql.gz ]; then
|
if [ ! -f country_grid.sql.gz ]; then
|
||||||
wget --no-verbose -O data/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz
|
wget --no-verbose https://www.nominatim.org/data/country_grid.sql.gz
|
||||||
fi
|
fi
|
||||||
|
cp country_grid.sql.gz Nominatim/data/country_osm_grid.sql.gz
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: mkdir build && cd build && cmake ..
|
run: mkdir build && cd build && cmake ../Nominatim
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
48
.github/workflows/ci-tests.yml
vendored
48
.github/workflows/ci-tests.yml
vendored
@@ -19,6 +19,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
path: Nominatim
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
@@ -35,35 +36,37 @@ jobs:
|
|||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
data/country_osm_grid.sql.gz
|
country_grid.sql.gz
|
||||||
monaco-latest.osm.pbf
|
key: nominatim-country-data-${{ steps.get-date.outputs.date }}
|
||||||
key: nominatim-data-${{ steps.get-date.outputs.date }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/setup-postgresql
|
- uses: ./Nominatim/.github/actions/setup-postgresql
|
||||||
with:
|
with:
|
||||||
postgresql-version: ${{ matrix.postgresql }}
|
postgresql-version: ${{ matrix.postgresql }}
|
||||||
postgis-version: ${{ matrix.postgis }}
|
postgis-version: ${{ matrix.postgis }}
|
||||||
- uses: ./.github/actions/build-nominatim
|
- uses: ./Nominatim/.github/actions/build-nominatim
|
||||||
|
|
||||||
- name: Install test prerequsites
|
- name: Install test prerequsites
|
||||||
run: sudo apt-get install -y -qq php-codesniffer pylint python3-pytest python3-behave
|
run: sudo apt-get install -y -qq php-codesniffer pylint python3-pytest python3-behave
|
||||||
|
|
||||||
- name: PHP linting
|
- name: PHP linting
|
||||||
run: phpcs --report-width=120 .
|
run: phpcs --report-width=120 .
|
||||||
|
working-directory: Nominatim
|
||||||
|
|
||||||
- name: Python linting
|
- name: Python linting
|
||||||
run: pylint --extension-pkg-whitelist=osmium nominatim
|
run: pylint --extension-pkg-whitelist=osmium nominatim
|
||||||
|
working-directory: Nominatim
|
||||||
|
|
||||||
- name: PHP unit tests
|
- name: PHP unit tests
|
||||||
run: phpunit ./
|
run: phpunit ./
|
||||||
working-directory: test/php
|
working-directory: Nominatim/test/php
|
||||||
|
|
||||||
- name: Python unit tests
|
- name: Python unit tests
|
||||||
run: py.test-3 test/python
|
run: py.test-3 test/python
|
||||||
|
working-directory: Nominatim
|
||||||
|
|
||||||
- name: BDD tests
|
- name: BDD tests
|
||||||
run: behave -DREMOVE_TEMPLATE=1 --format=progress3
|
run: behave -DREMOVE_TEMPLATE=1 -DBUILDDIR=$GITHUB_WORKSPACE/build --format=progress3
|
||||||
working-directory: test/bdd
|
working-directory: Nominatim/test/bdd
|
||||||
|
|
||||||
import:
|
import:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
@@ -72,6 +75,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
path: Nominatim
|
||||||
|
|
||||||
- name: Get Date
|
- name: Get Date
|
||||||
id: get-date
|
id: get-date
|
||||||
@@ -82,28 +86,36 @@ jobs:
|
|||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
data/country_osm_grid.sql.gz
|
country_grid.sql.gz
|
||||||
monaco-latest.osm.pbf
|
key: nominatim-country-data-${{ steps.get-date.outputs.date }}
|
||||||
key: nominatim-data-${{ steps.get-date.outputs.date }}
|
|
||||||
|
|
||||||
- uses: ./.github/actions/setup-postgresql
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
monaco-latest.osm.pbf
|
||||||
|
key: nominatim-test-data-${{ steps.get-date.outputs.date }}
|
||||||
|
|
||||||
|
- uses: ./Nominatim/.github/actions/setup-postgresql
|
||||||
with:
|
with:
|
||||||
postgresql-version: 13
|
postgresql-version: 13
|
||||||
postgis-version: 3
|
postgis-version: 3
|
||||||
- uses: ./.github/actions/build-nominatim
|
- uses: ./Nominatim/.github/actions/build-nominatim
|
||||||
|
|
||||||
|
- name: Clean installation
|
||||||
|
run: rm -rf Nominatim build
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Prepare import environment
|
- name: Prepare import environment
|
||||||
run: |
|
run: |
|
||||||
mkdir data-env
|
|
||||||
cd data-env
|
|
||||||
if [ ! -f monaco-latest.osm.pbf ]; then
|
if [ ! -f monaco-latest.osm.pbf ]; then
|
||||||
wget --no-verbose https://download.geofabrik.de/europe/monaco-latest.osm.pbf
|
wget --no-verbose https://download.geofabrik.de/europe/monaco-latest.osm.pbf
|
||||||
fi
|
fi
|
||||||
which nominatim
|
mkdir data-env
|
||||||
|
cd data-env
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Import
|
- name: Import
|
||||||
run: nominatim import --osm-file monaco-latest.osm.pbf
|
run: nominatim import --osm-file ../monaco-latest.osm.pbf
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: data-env
|
working-directory: data-env
|
||||||
|
|
||||||
@@ -112,7 +124,7 @@ jobs:
|
|||||||
working-directory: data-env
|
working-directory: data-env
|
||||||
|
|
||||||
- name: Check import
|
- name: Check import
|
||||||
run: nominatim check-database
|
run: nominatim admin --check-database
|
||||||
working-directory: data-env
|
working-directory: data-env
|
||||||
|
|
||||||
- name: Run update
|
- name: Run update
|
||||||
|
|||||||
Reference in New Issue
Block a user