diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 69064aeee8..756a79de1b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,8 +13,6 @@ jobs:
- name: Set up Python
run: |
python -m pip install pyyaml colormath
- - name: Set up apt
- run: sudo apt-get update -qq
- name: Set up xmllint
run: sudo apt-get install -qq --no-install-recommends libxml2-utils
- name: Set up shell
@@ -31,3 +29,19 @@ jobs:
run: diff -qu <(scripts/generate_road_colours.py) style/road-colors-generated.mss
- name: Check for unsupported class usage
run: '! grep "class:" project.mml > /dev/null'
+ import:
+ needs: [syntax]
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install osm2pgsql and database
+ run: sudo apt-get install -qq --no-install-recommends osm2pgsql postgresql-14-postgis-3
+ - name: Wait for database
+ run : sudo pg_ctlcluster 14 main start; until pg_isready; do sleep 0.5; done
+ - name: Setup database
+ run: sudo -i -u postgres createuser -s $USER && createdb -E utf8 gis && psql -Xq -d gis -c "CREATE EXTENSION postgis; CREATE EXTENSION hstore;"
+ - name: Import empty file
+ run: |
+ osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -r xml <(echo '')
+ - name: Create indexes
+ run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9db99105a9..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-language: node_js
-dist: bionic
-sudo: false
-node_js:
- - "14"
-services:
- - postgresql
-addons:
- postgresql: "9.5"
- apt:
- packages:
- - lua5.1
- - libxml2-utils
- - python3-pip
- - python3-setuptools
- - python-yaml
- - postgresql-9.5-postgis-2.4
- - osm2pgsql
-env:
- - CARTO=1.2.0 MAPNIK='3.0.0 3.0.12 3.0.22'
-install:
- - npm install carto@$CARTO
- - pip3 install --user colormath
- - createdb -w -E utf8 -U postgres gis && psql -Xq -d gis -U postgres -w -c "CREATE EXTENSION postgis; CREATE EXTENSION hstore;"
-script:
- # We're using pipes in the checks, so fail if any part fails
- - set -o pipefail
- # Check all tye YAML files are valid YAML
- - find . -not \( -path ./node_modules -prune \) \( -type f -name '*.yaml' -o -name '*.yml' -o -name '*.mml' \)
- -exec python -c "from yaml import safe_load; safe_load(file('{}'))" \;
- # Validate the MML against multiple Mapnik versions, and report its lines for debugging purposes
- - for m in $MAPNIK; do ./node_modules/carto/bin/carto -a $m project.mml | xmllint - | wc -l; done
- # Validate that the SVGs are valid XML
- - find symbols/ -name '*.svg' | xargs xmllint --noout
- # Check the Lua transforms
- - lua scripts/lua/test.lua
- # Check the indexes and road colours files are up to date
- - diff -qu <(scripts/indexes.py) indexes.sql
- - diff -qu <(scripts/generate_road_colours.py) style/road-colors-generated.mss
- # Create the PostgreSQL tables
- - osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -U postgres -d gis -r xml <(echo '')
- # Apply the custom indexes
- - psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql
- # Test for classes in project.mml (not supported in vector tiles)
- - '! grep "class:" project.mml > /dev/null'