63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
|
name: CI
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ master ]
|
||
|
pull_request:
|
||
|
branches: [ master ]
|
||
|
|
||
|
jobs:
|
||
|
|
||
|
check-addon:
|
||
|
name: Run kodi-addon-checker
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
python-version: [3.8]
|
||
|
steps:
|
||
|
- 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: |
|
||
|
sudo apt-get install libxml2-utils
|
||
|
python -m pip install --upgrade pip
|
||
|
pip install kodi-addon-checker
|
||
|
- name: Run kodi-addon-checker
|
||
|
run: |
|
||
|
make check-addon
|
||
|
|
||
|
tests:
|
||
|
name: Run unit tests
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
|
||
|
steps:
|
||
|
- 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: |
|
||
|
sudo apt-get install gettext
|
||
|
python -m pip install --upgrade pip
|
||
|
pip install -r requirements.txt
|
||
|
- name: Run checks
|
||
|
run: |
|
||
|
make check-pylint
|
||
|
make check-tox
|
||
|
make check-translations
|
||
|
- name: Run tests
|
||
|
env:
|
||
|
PYTHONIOENCODING: utf-8
|
||
|
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
|
||
|
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
|
||
|
run: |
|
||
|
make test
|
||
|
- name: Upload code coverage
|
||
|
uses: codecov/codecov-action@v1
|