mapbox / mapbox.js

Mapbox JavaScript API, a Leaflet Plugin
mapbox.com/mapbox.js/
Other
1.92k stars 386 forks source link

assert documentation exists when mapboxjs version is bumped #1309

Closed katydecorah closed 4 years ago

katydecorah commented 4 years ago

When mapboxjs is updated in _config.publisher-production.yml the documentation for that version must exist, otherwise, the production site will redirect to the 404 page. This is because the Mapbox.js landing page redirects to the latest version of the documentation.

This PR adds a test to verify that the documentation folder exists for the current mapboxjs version in _config.publisher-production.yml. If the folder does not exist, the tests will fail.

cc @whyvez @alulsh

whyvez commented 4 years ago

@katydecorah When will this test run? I don't think tests are run in Travis. Running tests locally is also hard because of the required dependencies (i.e. phantomjs). I think tests could fail and nobody would notice.

danswick commented 4 years ago

@whyvez the test was run on this PR https://travis-ci.org/mapbox/mapbox.js/builds/599273048#L520. I think the idea here is that docs should be created first, then version numbers bumped.

whyvez commented 4 years ago

@danswick Right! I forgot about the implicit npm test in Travis. When you say version bumped, you mean the version in the _config*.yml? If so why? I created an automated script here and would like to get it right in there.

katydecorah commented 4 years ago

The automated script in #1308 is awesome. I would still like to include this test as added assurance that documentation exists when the version is bumped in the publisher config to prevent broken pages - this is critical to documentation's operational excellence.