Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,61 @@ jobs:
check_mapfiles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "pip"
# Some mapfiles are generated by scripts, but also committed to the repo.
# Check for mismatches between committed files and script output.
- name: Regenerate mapfiles and check for equality
run: |
for script in gen_*.py; do
mapfile=$(echo $script | sed 's/^gen_//; s/\.py$//').map
if [ ! -f "$mapfile" ]; then
mapfile="private/$mapfile"
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.13
cache: "pip"
# Some mapfiles are generated by scripts, but also committed to the repo.
# Check for mismatches between committed files and script output.
- name: Regenerate mapfiles and check for equality
run: |
for script in gen_*.py; do
mapfile=$(echo $script | sed 's/^gen_//; s/\.py$//').map
if [ ! -f "$mapfile" ]; then
echo "Result of ${script} not committed"
exit 1
mapfile="private/$mapfile"
if [ ! -f "$mapfile" ]; then
echo "Result of ${script} not committed"
exit 1
fi
fi
fi
python3 "$script" | cmp - "$mapfile"
done
# The index.json file is not committed, but generated by the Docker
# entrypoint. It should at least be valid JSON.
- name: Check index.json file
run: |
# Create some bogus connection files, or including them will fail:
mkdir -p connections
for c in bag basiskaart dataselectie dataservices panorama; do
echo CONNECTIONTYPE postgis > connection/$c.inc
done
python3 tools/make_indexjson.py *.map | jq . > /dev/null
- name: Authorization checks
run: |
python3 -m pip install -r tools/requirements.txt
# adresseerbare_objecten and bgt_inrichtingselementen can't be parsed
# due to limitations in mappyfile.
# The other excluded maps should be fixed. They have workarounds in
# place to prevent access to restricted fields.
python3 tools/auth_check.py -e \
adresseerbare_objecten bgt_inrichtingselementen \
bomen brk2 ondergrond ziektenplagenexotengroen \
meldingen_huidige_jaar meldingen_vorige_jaar meldingen_indicatoren \
monumenten hr handelsregister hr_kvk eigendommen_v2 erfpacht_v2
python3 "$script" | cmp - "$mapfile"
done
# The index.json file is not committed, but generated by the Docker
# entrypoint. It should at least be valid JSON.
- name: Check index.json file
run: |
# Create some bogus connection files, or including them will fail:
mkdir -p connections
for c in bag basiskaart dataselectie dataservices panorama; do
echo CONNECTIONTYPE postgis > connection/$c.inc
done
python3 tools/make_indexjson.py *.map | jq . > /dev/null
- name: Authorization checks
run: |
python3 -m pip install -r tools/requirements.txt
# adresseerbare_objecten and bgt_inrichtingselementen can't be parsed
# due to limitations in mappyfile.
# The other excluded maps should be fixed. They have workarounds in
# place to prevent access to restricted fields.
python3 tools/auth_check.py -e \
adresseerbare_objecten bgt_inrichtingselementen \
bomen brk2 ondergrond ziektenplagenexotengroen \
meldingen_huidige_jaar meldingen_vorige_jaar meldingen_indicatoren \
monumenten hr handelsregister hr_kvk eigendommen_v2 erfpacht_v2

# Regression test. Asserts that we don't suffer from the MapServer 7.x
# bounding box bug https://github.com/MapServer/MapServer/issues/6478.
test_bbox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run MapServer
run: docker compose up -d public &&
sleep 3
- name: Projection test
run: |
curl 'http://localhost:8383/maps/projectiontest?REQUEST=GetFeature&SERVICE=wfs&OUTPUTFORMAT=application/json;%20subtype=geojson;%20charset=utf-8&Typename=feature&version=1.1.0&srsname=urn:ogc:def:crs:EPSG::4326&bbox=4.89337404,52.36483743,4.89351768,52.36489491';
curl 'http://localhost:8383/maps/projectiontest?REQUEST=GetFeature&SERVICE=wfs&OUTPUTFORMAT=application/json;%20subtype=geojson;%20charset=utf-8&Typename=feature&version=1.1.0&srsname=urn:ogc:def:crs:EPSG::4326&bbox=4.89337404,52.36483743,4.89351768,52.36489491' |
jq '.features | if length > 0 then . else halt_error(1) end'
- uses: actions/checkout@v3
- name: Run MapServer
run: docker compose up -d public &&
sleep 3
- name: Projection test
run: |
curl 'http://localhost:8383/maps/projectiontest?REQUEST=GetFeature&SERVICE=wfs&OUTPUTFORMAT=application/json;%20subtype=geojson;%20charset=utf-8&Typename=feature&version=1.1.0&srsname=urn:ogc:def:crs:EPSG::4326&bbox=4.89337404,52.36483743,4.89351768,52.36489491';
curl 'http://localhost:8383/maps/projectiontest?REQUEST=GetFeature&SERVICE=wfs&OUTPUTFORMAT=application/json;%20subtype=geojson;%20charset=utf-8&Typename=feature&version=1.1.0&srsname=urn:ogc:def:crs:EPSG::4326&bbox=4.89337404,52.36483743,4.89351768,52.36489491' |
jq '.features | if length > 0 then . else halt_error(1) end'
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:

# Bare bones 'webserver' to behave as public loadbalancer
publicdummy:
image: python:3.11-slim-bullseye
image: python:3.13-slim-bullseye
ports:
- 8000:8000
command: python3 -m http.server 8000
Expand Down
Loading
Loading