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

59 lines
1.6 KiB
YAML
Raw Permalink Normal View History

name: CI
on:
push:
2020-03-26 11:31:28 +01:00
branches:
- master
pull_request:
2020-03-26 11:31:28 +01:00
branches:
- master
jobs:
tests:
2020-03-26 11:31:28 +01:00
name: Unit tests
runs-on: ubuntu-latest
2020-03-26 11:31:28 +01:00
env:
PYTHONIOENCODING: utf-8
PYTHONPATH: ${{ github.workspace }}/resources/lib:${{ github.workspace }}/tests
strategy:
2020-03-26 11:31:28 +01:00
fail-fast: false
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
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
run: |
2020-04-02 20:21:00 +02:00
sudo apt-get install --no-install-recommends gettext ffmpeg
2020-03-26 11:31:28 +01:00
sudo pip install coverage --install-option="--install-scripts=/usr/bin"
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
run: |
make check-translations
2020-03-26 11:31:28 +01:00
- name: Run unit tests
env:
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
run: |
2020-03-26 11:31:28 +01:00
coverage run -m unittest discover
- name: Run addon
run: |
coverage run -a tests/run.py /
2020-03-26 11:31:28 +01:00
- name: Run add-on service
run: |
coverage run -a service_entry.py
- name: Upload code coverage to CodeCov
uses: codecov/codecov-action@v1
continue-on-error: true