mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Merge pull request #3658 from jtpavlock/integration_tests
Add weekly integration test github action
This commit is contained in:
commit
aedd77317f
3 changed files with 49 additions and 16 deletions
32
.github/workflows/integration_test.yaml
vendored
Normal file
32
.github/workflows/integration_test.yaml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: integration tests
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * SUN' # run every Sunday at midnight
|
||||
jobs:
|
||||
test integration:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
python-version: 3.8
|
||||
env:
|
||||
NOSE_SHOW_SKIPPED: 1
|
||||
PY_COLOR: 1
|
||||
INTEGRATION_TEST: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install base dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Test with tox
|
||||
run: |
|
||||
tox -e py38-test
|
||||
|
|
@ -269,8 +269,8 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
|
|||
|
||||
DEFAULT_SOURCES = [
|
||||
dict(DEFAULT_SONG, backend=lyrics.LyricsWiki),
|
||||
dict(artist=u'Santana', title=u'Black magic woman',
|
||||
backend=lyrics.MusiXmatch),
|
||||
# dict(artist=u'Santana', title=u'Black magic woman',
|
||||
# backend=lyrics.MusiXmatch),
|
||||
dict(DEFAULT_SONG, backend=lyrics.Genius),
|
||||
]
|
||||
|
||||
|
|
@ -284,9 +284,9 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
|
|||
dict(DEFAULT_SONG,
|
||||
url=u'http://www.chartlyrics.com',
|
||||
path=u'/_LsLsZ7P4EK-F-LD4dJgDQ/Lady+Madonna.aspx'),
|
||||
dict(DEFAULT_SONG,
|
||||
url=u'http://www.elyricsworld.com',
|
||||
path=u'/lady_madonna_lyrics_beatles.html'),
|
||||
# dict(DEFAULT_SONG,
|
||||
# url=u'http://www.elyricsworld.com',
|
||||
# path=u'/lady_madonna_lyrics_beatles.html'),
|
||||
dict(url=u'http://www.lacoccinelle.net',
|
||||
artist=u'Jacques Brel', title=u"Amsterdam",
|
||||
path=u'/paroles-officielles/275679.html'),
|
||||
|
|
@ -303,11 +303,11 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
|
|||
dict(url=u'http://www.lyricsontop.com',
|
||||
artist=u'Amy Winehouse', title=u"Jazz'n'blues",
|
||||
path=u'/amy-winehouse-songs/jazz-n-blues-lyrics.html'),
|
||||
dict(DEFAULT_SONG,
|
||||
url='http://www.metrolyrics.com/',
|
||||
path='lady-madonna-lyrics-beatles.html'),
|
||||
dict(url='http://www.musica.com/', path='letras.asp?letra=2738',
|
||||
artist=u'Santana', title=u'Black magic woman'),
|
||||
# dict(DEFAULT_SONG,
|
||||
# url='http://www.metrolyrics.com/',
|
||||
# path='lady-madonna-lyrics-beatles.html'),
|
||||
# dict(url='http://www.musica.com/', path='letras.asp?letra=2738',
|
||||
# artist=u'Santana', title=u'Black magic woman'),
|
||||
dict(url=u'http://www.paroles.net/',
|
||||
artist=u'Lilly Wood & the prick', title=u"Hey it's ok",
|
||||
path=u'lilly-wood-the-prick/paroles-hey-it-s-ok'),
|
||||
|
|
@ -323,9 +323,9 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
|
|||
LyricsGoogleBaseTest.setUp(self)
|
||||
self.plugin = lyrics.LyricsPlugin()
|
||||
|
||||
@unittest.skipUnless(os.environ.get(
|
||||
'BEETS_TEST_LYRICS_SOURCES', '0') == '1',
|
||||
'lyrics sources testing not enabled')
|
||||
@unittest.skipUnless(
|
||||
os.environ.get('INTEGRATION_TEST', '0') == '1',
|
||||
'integration testing not enabled')
|
||||
def test_backend_sources_ok(self):
|
||||
"""Test default backends with songs known to exist in respective databases.
|
||||
"""
|
||||
|
|
@ -337,9 +337,9 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest):
|
|||
errors.append(s['backend'].__name__)
|
||||
self.assertFalse(errors)
|
||||
|
||||
@unittest.skipUnless(os.environ.get(
|
||||
'BEETS_TEST_LYRICS_SOURCES', '0') == '1',
|
||||
'lyrics sources testing not enabled')
|
||||
@unittest.skipUnless(
|
||||
os.environ.get('INTEGRATION_TEST', '0') == '1',
|
||||
'integration testing not enabled')
|
||||
def test_google_sources_ok(self):
|
||||
"""Test if lyrics present on websites registered in beets google custom
|
||||
search engine are correctly scraped.
|
||||
|
|
|
|||
1
tox.ini
1
tox.ini
|
|
@ -37,6 +37,7 @@ files = beets beetsplug beet test setup.py docs
|
|||
[testenv]
|
||||
passenv =
|
||||
NOSE_SHOW_SKIPPED # Undocumented feature of nose-show-skipped.
|
||||
INTEGRATION_TEST # set to 1 for integration tests
|
||||
deps =
|
||||
{test,cov}: {[_test]deps}
|
||||
py27: pathlib
|
||||
|
|
|
|||
Loading…
Reference in a new issue