Test cases exercising the code lines calling into Wikidata related code need to be written
Configuration in CI was done, so the below is historic.
Given that the internals of Wikidata cannot be guaranteed to be stable we should make sure that the integration of WikidataPageBanner with it is tested and that the these are run by the CI. This requires that at least one job is run with Wikibase available.
One can add Wikidata as a dependency of WikidataPageBanner to its test job in integration/config.git/zuul/ext_dependencies.py . Then to run those tests before deployment T96264 needs to be done and WikidataPageBanner also needs to be added to the mediawiki-extensions-hhvm job.
An alternative implementation that only uses interfaces that have stability guarantees is outlined in T106773: use wikibase composer managed libraries together with the API.