Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing health screenshot #947

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
name: Take Screenshots
runs-on: ubuntu-latest
env:
SCREENSHOT_CONTAINER: ghcr.io/linz/basemaps-screenshot/cli:v1
SCREENSHOT_CONTAINER: ghcr.io/linz/basemaps-screenshot/cli:v1.7.0-2-g99b800e
DOCKER_AWS_ENV: -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_DEFAULT_REGION
CONFIG_PATH: ${{ needs.build.outputs.config_path }}
BASEMAPS_HOST: http://localhost:5000
Expand All @@ -251,7 +251,7 @@ jobs:
# Wait for the server to start
timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/v1/version)" != "200" ]]; do sleep 0.5; done' || false

docker run --rm --network="host" -v $PWD:$PWD ${DOCKER_AWS_ENV} ${SCREENSHOT_CONTAINER} --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots
docker run --rm --network="host" -v $PWD:$PWD ${DOCKER_AWS_ENV} ${SCREENSHOT_CONTAINER} --test $PWD/test.json --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots

- name: Save snapshots
uses: getsentry/action-visual-snapshot@v2
Expand Down
31 changes: 31 additions & 0 deletions config/style/health_aerial_hillshade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "st_health_aerial_hillshade",
"layers": [
{
"id": "Aerial-Imagery",
"source": "LINZ-Basemaps",
"type": "raster"
},
{
"id": "LINZ-HillShade",
"paint": { "hillshade-shadow-color": "#040404" },
"source": "LINZ-Terrain",
"type": "hillshade"
}
],
"name": "aerial",
"sources": {
"LINZ-Basemaps": {
"tileSize": 256,
"tiles": ["/v1/tiles/aerial/{tileMatrix}/{z}/{x}/{y}.webp"],
"type": "raster"
},
"LINZ-Terrain": {
"maxzoom": 18,
"tileSize": 256,
"tiles": ["/v1/tiles/elevation/{tileMatrix}/{z}/{x}/{y}.png?pipeline=terrain-rgb"],
"type": "raster-dem"
}
},
"version": 8
}
29 changes: 29 additions & 0 deletions config/style/health_aerial_terrain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"id": "st_health_aerial_terrain",
"layers": [
{
"id": "Aerial-Imagery",
"source": "LINZ-Basemaps",
"type": "raster"
}
],
"name": "aerial",
"sources": {
"LINZ-Basemaps": {
"tileSize": 256,
"tiles": ["/v1/tiles/aerial/{tileMatrix}/{z}/{x}/{y}.webp"],
"type": "raster"
},
"LINZ-Terrain": {
"maxzoom": 18,
"tileSize": 256,
"tiles": ["/v1/tiles/elevation/{tileMatrix}/{z}/{x}/{y}.png?pipeline=terrain-rgb"],
"type": "raster-dem"
}
},
"terrain": {
"exaggeration": 1.2,
"source": "LINZ-Terrain"
},
"version": 8
}
16 changes: 16 additions & 0 deletions test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"name": "health-aerial-terrain-3857-z5",
"tileMatrix": "WebMercatorQuad",
"location": { "lat": -41.8899962, "lng": 174.0492437, "z": 12, "p": 58 },
"tileSet": "aerial",
"style": "health_aerial_terrain"
},
{
"name": "health-aerial-hillshade-3857-z5",
"tileMatrix": "WebMercatorQuad",
"location": { "lat": -43.1785324, "lng": 171.3611922, "z": 7 },
"tileSet": "aerial",
"style": "health_aerial_hillshade"
}
]
Loading