plugin.video.viervijfzes/.github/workflows/ci.yml
Michaël Arnauts 98a0ffb162
Support Python 3.10 (#107)
* Support Python 3.10

* Add timeout

* Fix test
2022-10-16 15:36:00 +02:00

70 lines
2.1 KiB
YAML

name: CI
on:
# Run action when pushed to master, or for commits in a pull request.
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: Add-on testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ]
include:
# 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
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run pylint
run: make check-pylint
- name: Check translations
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
run: sudo apt-get install gettext && make check-translations
- name: Run unit tests
env:
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
PYTHONIOENCODING: utf-8
KODI_HOME: ${{ github.workspace }}/tests/home
KODI_INTERACTIVE: 0
KODI_STUB_RPC_RESPONSES: ${{ github.workspace }}/tests/rpc
HTTP_PROXY: ${{ secrets.HTTP_PROXY }}
run: pytest -x -v --cov=./ --cov-report=xml tests
- name: Upload code coverage to CodeCov
uses: codecov/codecov-action@v1
continue-on-error: true
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
with:
flags: unittests
env_vars: OS,PYTHON