diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 52c28d714c..0fc8c53653 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,6 +45,8 @@ jobs: - if: ${{ env.IS_MAIN_PYTHON == 'true' }} name: Test with coverage + env: + INTEGRATION_TEST: 1 uses: liskin/gh-problem-matcher-wrap@v3 with: linters: pytest diff --git a/test/plugins/test_lyrics.py b/test/plugins/test_lyrics.py index a58fe4697b..812cc5fb61 100644 --- a/test/plugins/test_lyrics.py +++ b/test/plugins/test_lyrics.py @@ -20,6 +20,7 @@ from http import HTTPStatus import pytest +import requests from beets.library import Item from beets.test.helper import PluginMixin @@ -34,12 +35,6 @@ _p = pytest.param -skip_ci = pytest.mark.skipif( - os.environ.get("GITHUB_ACTIONS") == "true", - reason="GitHub actions is on some form of Cloudflare blacklist", -) - - class TestLyricsUtils: def test_search_artist(self): item = Item(artist="Alice ft. Bob", title="song") @@ -276,13 +271,9 @@ def file_name(self): "https://sweetslyrics.com/the-beatles/lady-madonna-lyrics", "https://www.musica.com/letras.asp?letra=59862", "https://www.lacoccinelle.net/259956-the-beatles-lady-madonna.html", + "https://www.azlyrics.com/lyrics/beatles/ladymadonna.html", ) ), - pytest.param( - "Lady Madonna", - "https://www.azlyrics.com/lyrics/beatles/ladymadonna.html", - marks=skip_ci, - ), ( "Jazz'n'blues", "https://www.lyricsontop.com/amy-winehouse-songs/jazz-n-blues-lyrics.html", # noqa: E501 @@ -350,6 +341,14 @@ class TestGeniusLyrics(LyricsPluginBackendMixin): def backend_name(self): return "genius" + @pytest.mark.xfail( + bool(os.environ.get("GITHUB_ACTIONS")), + reason="Genius returns 403 FORBIDDEN in CI", + raises=requests.HTTPError, + ) + def test_backend_source(self, backend): + super().test_backend_source(backend) + @pytest.mark.parametrize( "file_name, expected_line_count", [