geopandas / xyzservices

Source of XYZ tiles providers
https://xyzservices.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
169 stars 32 forks source link

TST: test providers requiring API token #86

Closed martinfleis closed 3 years ago

martinfleis commented 3 years ago

I am trying to figure out a way of testing providers that require API tokens. It seems to be doable:

  1. register and get API token
  2. store it as a repository secret
  3. load it in tests.yaml
  4. load it via os.environ in tests

Note that secrets are loaded as empty strings if the PR is coming from a fork. We xfail in that case. I am going to merge this to trigger proper test and open a new PR adding other services as a branch of upstream.

martinfleis commented 3 years ago

This approach works. See https://github.com/geopandas/xyzservices/runs/3333840670?check_suite_focus=true#step:6:358