Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
99e1062
mapserver->8.0, gdal->3.5.2, proj->9.1.0
WouterVisscher Oct 18, 2022
e034b63
Merge branch 'master' into mapserv-proj-gdal-upgrade
WouterVisscher Oct 19, 2022
56a8292
init testfile + figuring things out
WouterVisscher Oct 25, 2022
f55fd26
WIP upgrade mapserver 8.0.x
Robbert2407 Jun 15, 2023
546ee1f
upgrade to bookworm
Robbert2407 Jul 18, 2023
512de4c
mapserver tag 8.0.1 and sqlite3 + spatialite
Robbert2407 Aug 22, 2023
a9876ec
wip: base with working proj 9.2.1 & nsgi proj.db
WouterVisscher Oct 5, 2023
d5bb2af
Merge branch 'etrs89-rdnap' into map8
WouterVisscher Oct 5, 2023
83a9329
test config
WouterVisscher Oct 5, 2023
ed1b6d5
fix Dockerfile
WouterVisscher Oct 5, 2023
1898459
del old etc files
roelarents Nov 6, 2023
9d43cf4
use proj from osgeo/proj
roelarents Nov 6, 2023
0b0c75b
replace NL dockerfile with a build target
roelarents Sep 2, 2024
d90ae34
use GeodetischeInfrastructuur/transformations as source for NL
roelarents Sep 2, 2024
9768ba3
update to mapserver 8.2.2
roelarents Sep 3, 2024
f405397
add some docs to rdnaptrans test
roelarents Sep 3, 2024
2291f95
nsgi 1.2.1
roelarents Sep 5, 2024
4c70a4c
tidy the Dockerfile
roelarents Sep 15, 2024
8929e13
add proj datumgrid cdn
roelarents Sep 15, 2024
408de7b
Add regression test action; add test data
kad-korpem Jan 20, 2025
563ae52
Correct action name
kad-korpem Jan 20, 2025
87bd7f1
Change lighttpd image version
kad-korpem Jan 20, 2025
0a04ea1
Correct image tag
kad-korpem Jan 20, 2025
c6931b7
Separate WMS/WFS tests, add note regarding perceptualdiff
kad-korpem Jan 22, 2025
a1c9477
Integrate ETRS89andRDNAP test in regression-test action
kad-korpem Jan 22, 2025
5c8b545
Merge pull request #60 from PDOK/mapserver_8.0.x_upgrade_regressiontest
kad-korpem Jan 22, 2025
41081f7
Clarify lighttpd image is pre-release
kad-korpem Jan 22, 2025
c9a3569
Polish Dockerfile
kad-korpem Jan 22, 2025
3475943
Merge branch 'master' into mapserver_8.0.x_upgrade
Daimanta Feb 10, 2025
a965d66
Update build-and-publish-image.yml
rahmabPublic Feb 11, 2025
e2bd866
Update build-and-publish-image.yml
rahmabPublic Feb 11, 2025
453eed3
Merge pull request #61 from Daimanta/mapserver_8.0.x_upgrade
Shalucik Feb 11, 2025
297fc42
Started on CRS testcase
Daimanta Feb 11, 2025
fde867d
Added testcase and fixed warning from lighttpd
Daimanta Feb 12, 2025
dacb284
Merge pull request #62 from Daimanta/mapserver_8_crs_test
Shalucik Feb 14, 2025
73d962a
upgrade to 8.4.0
Robbert2407 Feb 25, 2025
4971a3f
Upgrade lighttpd to 1.5.0
Feb 27, 2025
1c2a172
merge lighttpd
Feb 27, 2025
5b88a58
Added pcre2-posix lib
Feb 28, 2025
aef0e69
Using correct lighttpd tag
Feb 28, 2025
ed0b4de
Add libspatialite-dev, explicitly instruct GDAL compile to use Spatia…
kad-korpem Mar 27, 2025
811de2a
Merge branch 'master' into mapserver_8.0.x_upgrade
kad-korpem Mar 27, 2025
944a12f
Add libspatialite7
kad-korpem Mar 27, 2025
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
7 changes: 4 additions & 3 deletions .github/workflows/build-and-publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ jobs:
with:
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
file: ${{context}}/Dockerfile
file: ./Dockerfile
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Build and push NL
id: docker_build
id: docker_build_nl
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.docker_meta.outputs.tags }}-nl
file: ${{context}}/Dockerfile.NL
file: ./Dockerfile
target: NL
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
Expand Down
177 changes: 177 additions & 0 deletions .github/workflows/regression-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
name: regression-test
on:
pull_request:
jobs:
test-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# build local test image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
- name: Build test image
uses: docker/build-push-action@v5
with:
push: false
tags: pdok/mapserver:local
- name: Build test image (NL target)
uses: docker/build-push-action@v5
with:
push: false
target: NL
tags: pdok/mapserver:local-nl

- name: Regression test => rectObj wrong projection (WMS)
run: |
# start WMS mapserver
docker run -e MAPSERVER_CONFIG_FILE=/srv/data/rectobj.conf -e MS_MAPFILE=/srv/data/rectobj.map -e SERVICE_TYPE=WMS --rm -d \
-p 8181:80 --name mapserver-rectobj-wms -v `pwd`/testdata/rectobj:/srv/data pdok/mapserver:local

# execute request
mkdir -p `pwd`/testdata/rectobj/actual
curl "http://localhost:8181/mapserver?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=545287.2873572960962,6867556.049125162885,545689.3385149866808,6868025.580225903541&CRS=EPSG:3857&WIDTH=995&HEIGHT=1162&LAYERS=pand&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE" -sLo `pwd`/testdata/rectobj/actual/rectobj.png

# assert results are as expected
exit_code=0

# diff WMS png files, if binary diff exists, check for 'perceptual diff' using compiled binary of https://github.com/myint/perceptualdiff
wms_diff=$(diff -q `pwd`/testdata/rectobj/expected/wms.png `pwd`/testdata/rectobj/actual/rectobj.png)
if [ -n "$wms_diff" ]
then
echo "binary diff between images, checking for perceptual diff"
wms_pdiff=$(`pwd`/testdata/perceptualdiff `pwd`/testdata/rectobj/expected/wms.png `pwd`/testdata/rectobj/actual/rectobj.png)
if [ -n "$wms_pdiff" ]
then
echo "$wms_pdiff"
exit_code=1
fi
fi

# cleanup
rm -rf `pwd`/testdata/rectobj/actual

# stop mapserver
docker stop mapserver-rectobj-wms

exit $exit_code

- name: Regression test => rectObj wrong projection (WFS)
run: |
# start WFS mapserver
docker run -e MAPSERVER_CONFIG_FILE=/srv/data/rectobj.conf -e MS_MAPFILE=/srv/data/rectobj.map -e SERVICE_TYPE=WFS --rm -d \
-p 8182:80 --name mapserver-rectobj-wfs -v `pwd`/testdata/rectobj:/srv/data pdok/mapserver:local

# execute request
mkdir -p `pwd`/testdata/rectobj/actual
curl "http://localhost:8182/mapserver?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=bag:pand&STARTINDEX=0&COUNT=1000&SRSNAME=urn:ogc:def:crs:EPSG::3857&BBOX=545287.2873572960962,6867556.049125162885,545689.3385149866808,6868025.580225903541,urn:ogc:def:crs:EPSG::3857" -sLo `pwd`/testdata/rectobj/actual/rectobj.xml

# assert results are as expected
exit_code=0

# diff WFS xml files, ignore timestamp but match numberMatched and numberReturned
wfs_diff=$(diff -q `pwd`/testdata/rectobj/expected/wfs.xml `pwd`/testdata/rectobj/actual/rectobj.xml -I 'timeStamp="[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}"\snumberMatched="5"\snumberReturned="5"')
if [ -n "$wfs_diff" ]
then
echo "$wfs_diff"
exit_code=1
fi

# cleanup
rm -rf `pwd`/testdata/rectobj/actual

# stop mapserver
docker stop mapserver-rectobj-wfs

exit $exit_code

- name: Regression test => RDNAPTRANS (RD->ETRS89)
run: |
# start mapserver
docker run --rm -d -p 8181:80 --name mapserver-rdnap-wfs -v `pwd`/testdata/ETRS89andRDNAP:/srv/data -e MAPSERVER_CONFIG_FILE=/srv/data/rd.conf -e SERVICE_TYPE=wfs -e MS_MAPFILE=/srv/data/rd.map pdok/mapserver:local

# execute request
mkdir -p `pwd`/testdata/ETRS89andRDNAP/actual
curl "http://localhost:8181/mapserver?service=WFS&version=2.0.0&request=GetFeature&typeName=rd&outputFormat=geojson&srsName=EPSG:4258" -sL | \
jq --arg crs "etrs89" '.features | .[] | { id, x_dev: (.geometry.coordinates[0] - (.properties[$crs+"_x"]|tonumber)), y_dev: (.geometry.coordinates[1] - (.properties[$crs+"_y"]|tonumber)) } | {error: ((.x_dev|fabs) > 0.001 or (.y_dev|fabs) > 0.001 )} + .' | \
jq -s 'group_by (.error)[] | {error: .[0].error, count: length}' > `pwd`/testdata/ETRS89andRDNAP/actual/etrs89.json

# assert results are as expected
exit_code=0
results=($(cat `pwd`/testdata/ETRS89andRDNAP/actual/etrs89.json | jq -r '.error'))
for err in "${results[@]}"
do
if [ "$err" == "true" ]
then
echo "found errors in RDNAPTRANS from RD to ETRS89:"
cat `pwd`/testdata/ETRS89andRDNAP/actual/etrs89.json
exit_code=1
fi
done

# cleanup
rm -rf `pwd`/testdata/ETRS89andRDNAP/actual

# stop mapserver
docker stop mapserver-rdnap-wfs

exit $exit_code

- name: Regression test => RDNAPTRANS (ETRS89->RD)
run: |
# start mapserver
docker run --rm -d -p 8181:80 --name mapserver-rdnap-wfs -v `pwd`/testdata/ETRS89andRDNAP:/srv/data -e MAPSERVER_CONFIG_FILE=/srv/data/etrs89.conf -e SERVICE_TYPE=wfs -e MS_MAPFILE=/srv/data/etrs89.map pdok/mapserver:local-nl

# execute request
mkdir -p `pwd`/testdata/ETRS89andRDNAP/actual
curl "http://localhost:8181/mapserver?service=WFS&version=2.0.0&request=GetFeature&typeName=etrs89&outputFormat=geojson&srsName=EPSG:28992" -sL | \
jq --arg crs "rd" '.features | .[] | { id, x_dev: (.geometry.coordinates[0] - (.properties[$crs+"_x"]|tonumber)), y_dev: (.geometry.coordinates[1] - (.properties[$crs+"_y"]|tonumber)) } | {error: ((.x_dev|fabs) > 0.001 or (.y_dev|fabs) > 0.001 )} + .' | \
jq -s 'group_by (.error)[] | {error: .[0].error, count: length}' > `pwd`/testdata/ETRS89andRDNAP/actual/rd.json

# assert results are as expected
exit_code=0
results=($(cat `pwd`/testdata/ETRS89andRDNAP/actual/rd.json | jq -r '.error'))
for err in "${results[@]}"
do
if [ "$err" == "true" ]
then
echo "found errors in RDNAPTRANS from ETRS89 to RD:"
cat `pwd`/testdata/ETRS89andRDNAP/actual/rd.json
exit_code=1
fi
done

# cleanup
rm -rf `pwd`/testdata/ETRS89andRDNAP/actual

# stop mapserver
docker stop mapserver-rdnap-wfs

exit $exit_code
- name: Regression test => Different CRS (RDNAPTRANS -> EPSG:4258)
run: |
# start mapserver
docker run --rm -d -p 8181:80 --name mapserver-crs -v `pwd`/testdata/crs:/srv/data -e MAPSERVER_CONFIG_FILE=/srv/data/natpark.conf -e SERVICE_TYPE=wfs -e MS_MAPFILE=/srv/data/natpark.map pdok/mapserver:local-nl

# execute request
mkdir -p `pwd`/testdata/crs/actual
curl "http://localhost:8181/mapserver?service=WFS&request=GetFeature&count=1&version=2.0.0&outputFormat=application/json&typeName=nationaleparken&srsName=EPSG:4258" -sL > `pwd`/testdata/crs/actual/output.json

# assert results are as expected
exit_code=0
[ $(cat `pwd`/testdata/crs/actual/output.json | jq -r '.crs.properties.name') == "urn:ogc:def:crs:EPSG::4258" ] || exit_code=1;
[ $(cat `pwd`/testdata/crs/actual/output.json | jq -r '.bbox[0]' | xargs -I '{}' echo "scale=5;" "({}-4.3646379084)/1 == 0" | bc) ] || exit_code=1;
[ $(cat `pwd`/testdata/crs/actual/output.json | jq -r '.bbox[1]' | xargs -I '{}' echo "scale=5;" "({}-51.3620482342678)/1 == 0" | bc) ] || exit_code=1;
[ $(cat `pwd`/testdata/crs/actual/output.json | jq -r '.bbox[2]' | xargs -I '{}' echo "scale=5;" "({}-4.46528581228022)/1 == 0" | bc) ] || exit_code=1;
[ $(cat `pwd`/testdata/crs/actual/output.json | jq -r '.bbox[3]' | xargs -I '{}' echo "scale=5;" "({}-51.4268875774673)/1 == 0" | bc) ] || exit_code=1;

# cleanup
rm -rf `pwd`/testdata/crs/actual

# stop mapserver
docker stop mapserver-crs

exit $exit_code
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/mapserver-docker.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading