Update CI pipeline

This commit is contained in:
Michaël Arnauts 2023-01-04 14:06:58 +01:00
parent f7f1921c2b
commit 5ce74e4ec3
2 changed files with 17 additions and 16 deletions

View File

@ -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 }}

View File

@ -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)