From c14f5663d1e1c8a4f30bad7887870903a2d34967 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Mon, 17 Jul 2023 23:28:30 +0800 Subject: [PATCH] add ci README --- ci/README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ ci/examples.json | 8 ++++---- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 ci/README.md diff --git a/ci/README.md b/ci/README.md new file mode 100644 index 00000000..ea3c8be4 --- /dev/null +++ b/ci/README.md @@ -0,0 +1,49 @@ +# Basemaps Visual Test Suite + +## Artifacts + +Recent git commits on `main` and pull requests each have a set of artifacts. + +The test suite depends on the existence of a public HTTP endpoint with these paths: + +* `ci-storage.protomaps.com/smalltestregion.osm.pbf` +* `ci-storage.protomaps.com/artifacts/ARTIFACT_SHA/smalltestregion_vector.pmtiles` +* `ci-storage.protomaps.com/artifacts/ARTIFACT_SHA/light.json` + +`smalltestregion_vector.pmtiles` is the java tiler output at SHA run on `smalltestregion.osm.pbf`. +`light.json` is the generated `layers` of the GL JSON (not the full style). + +*Later we will add more than just light.json* + +## Test Examples + +The file `examples.json` is a JSON array of named examples. Each example consists of: + +* a `center` lon,lat +* a `zoom` level +* a `name` that must be a simple slug e.g. `null-island` +* a `description` to explain the cartographic feature under test. +* an array of string `tags` that group examples e.g. `buildings`, `national-parks` + +## Test Runner + +`index.html` is the single-file test runner, there is no build step. It takes query parameters: + +Required query parameters: + +* `?left=abc123&right=61`: The Artifact SHA or PR# to display on each side of the comparison. + +Optional query parameters: + +* `?name=null-island`: run only the named example. +* `?tag=national-parks`: run only one tag. +* `?showDifferencesOnly`: run the tests, but only display where the pixels don't match. + +## Versions + +The tile archive and named style layers are the only versioned artifacts. Non-versioned parts that affect the test run: + +* The current `examples.json` +* The `smalltestregion.osm.pbf` covered areas and snapshot date from OSM. +* The `maplibre-gl-js` version. +* The font glyphs and sprite assets used by the style. \ No newline at end of file diff --git a/ci/examples.json b/ci/examples.json index 66b16401..f7140ff1 100644 --- a/ci/examples.json +++ b/ci/examples.json @@ -1,15 +1,15 @@ [ { - "name":"oakland-ca-road-network", + "name":"taiwan-z8", "description":"Compare the appearance of highways", - "tags":["highway"], + "tags":["highway", "cjk"], "center":[121.333,24.320], "zoom":8 }, { - "name":"jakarta-buildings", + "name":"taiwan-z16-buildings", "description":"Compare the appearance of buildings", - "tags":["buildings","indonesia"], + "tags":["buildings","cjk"], "center":[121.4818, 25.0271], "zoom": 16 }