Merge pull request #3713 from jackwilsdon/skip-genius-ci

Skip Genius integration test on GitHub actions
This commit is contained in:
Jack Wilsdon 2020-08-02 18:54:10 +01:00 committed by GitHub
commit 20713a2ac3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -330,7 +330,12 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
"""Test default backends with songs known to exist in respective databases.
"""
errors = []
for s in self.DEFAULT_SOURCES:
# GitHub actions seems to be on a Cloudflare blacklist, so we can't
# contact genius.
sources = [s for s in self.DEFAULT_SOURCES if
s['backend'] != lyrics.Genius or
os.environ.get('GITHUB_ACTIONS') != 'true']
for s in sources:
res = s['backend'](self.plugin.config, self.plugin._log).fetch(
s['artist'], s['title'])
if not is_lyrics_content_ok(s['title'], res):

View file

@ -30,4 +30,5 @@ commands = sphinx-build -W -q -b html docs {envtmpdir}/html {posargs}
[testenv:int]
deps = {[_test]deps}
setenv = INTEGRATION_TEST = 1
passenv = GITHUB_ACTIONS
commands = python -bb -m pytest {posargs}