From 5ce74e4ec3cc3c47e43604c744a9545c2189dd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Wed, 4 Jan 2023 14:06:58 +0100 Subject: [PATCH] Update CI pipeline --- .github/workflows/ci.yml | 27 ++++++++++++++------------- tests/test_api.py | 6 +++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28a7943..d2407b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,26 +14,27 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] - python-version: [ "2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ] + os: [ ubuntu-latest, windows-latest ] + python-version: ["3.8", "3.9", "3.10"] include: + # End-of-life Python versions are not available anymore with ubuntu-latest + - os: ubuntu-20.04 + python-version: "2.7" + - os: ubuntu-20.04 + python-version: "3.5" + - os: ubuntu-20.04 + python-version: "3.6" + - os: ubuntu-20.04 + python-version: "3.7" # Kodi Leia on Windows uses a bundled Python 2.7. - os: windows-latest python-version: "2.7" - - # Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 and 3.10 also to be sure. - - os: windows-latest - python-version: "3.8" - - os: windows-latest - python-version: "3.9" - - os: windows-latest - python-version: "3.10" steps: - name: Check out ${{ github.sha }} from repository ${{ github.repository }} - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -59,7 +60,7 @@ jobs: run: pytest -x -v --cov=./ --cov-report=xml tests - name: Upload code coverage to CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 continue-on-error: true env: OS: ${{ matrix.os }} diff --git a/tests/test_api.py b/tests/test_api.py index 77edf18..56ce607 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -47,7 +47,7 @@ class TestApi(unittest.TestCase): self.assertIsInstance(programs[0], Program) def test_episodes(self): - for program in ['auwch', 'zo-man-zo-vrouw']: + for program in ['gentwest', 'zo-man-zo-vrouw']: program = self._api.get_program(program, cache=CACHE_PREVENT) self.assertIsInstance(program, Program) self.assertIsInstance(program.seasons, dict) @@ -66,7 +66,7 @@ class TestApi(unittest.TestCase): @unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.') def test_get_stream(self): - program = self._api.get_program('auwch') + program = self._api.get_program('gentwest') self.assertIsInstance(program, Program) episode = program.episodes[0] @@ -75,7 +75,7 @@ class TestApi(unittest.TestCase): @unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.') def test_get_drm_stream(self): - resolved_stream = self._api.get_stream_by_uuid('62e04ab5-1f3c-4385-ad7a-e2943ddb1849') # https://www.goplay.be/video/ncis-los-angeles/ncis-los-angeles-s10/ncis-los-angeles-s10-aflevering-12 + resolved_stream = self._api.get_stream_by_uuid('e7faa457-5768-4abd-bf4f-5a0e1055bbd3') # https://www.goplay.be/video/ncis-los-angeles/ncis-los-angeles-s13/ncis-los-angeles-s13-aflevering-1 self.assertIsInstance(resolved_stream, ResolvedStream)