plugin.video.viervijfzes/.github/workflows/ci.yml

66 lines
2.2 KiB
YAML
Raw Normal View History

name: CI
on:
- pull_request
- push
jobs:
tests:
name: Add-on testing
runs-on: ${{ matrix.os }}
2020-03-26 11:31:28 +01:00
env:
PYTHONIOENCODING: utf-8
2020-07-09 10:16:45 +02:00
PYTHONPATH: ${{ github.workspace }}/resources/lib
KODI_HOME: ${{ github.workspace }}/tests/home
KODI_INTERACTIVE: 0
strategy:
2020-03-26 11:31:28 +01:00
fail-fast: false
matrix:
os: [ubuntu-latest]
2020-11-30 10:15:52 +01:00
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
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
- os: windows-latest
python-version: 3.8
- os: windows-latest
python-version: 3.9
steps:
2020-03-26 11:31:28 +01:00
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install gettext
2020-03-26 11:31:28 +01:00
sudo pip install coverage --install-option="--install-scripts=/usr/bin"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
2020-03-26 11:31:28 +01:00
- name: Run pylint
run: make check-pylint
2020-03-26 11:31:28 +01:00
- name: Run tox
run: make check-tox
2020-03-26 11:31:28 +01:00
- name: Check translations
if: matrix.os == 'ubuntu-latest'
run: make check-translations
2020-03-26 11:31:28 +01:00
- name: Run unit tests
run: coverage run -m unittest discover
env:
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
2020-07-09 10:16:45 +02:00
- name: Run addon service for 10 seconds
if: matrix.os == 'ubuntu-latest'
2020-07-09 10:16:45 +02:00
run: timeout --preserve-status -s SIGINT 10 coverage run -a service_entry.py
env:
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
2020-03-26 11:31:28 +01:00
- name: Upload code coverage to CodeCov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
continue-on-error: true