-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.7 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
- pull_request
- push
jobs:
tests:
name: Add-on testing
runs-on: ubuntu-latest
env:
PYTHONIOENCODING: utf-8
PYTHONPATH: ${{ github.workspace }}/resources/lib
KODI_HOME: ${{ github.workspace }}/tests/home
KODI_INTERACTIVE: 0
strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
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@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install gettext
sudo pip install coverage --install-option="--install-scripts=/usr/bin"
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pylint
run: make check-pylint
- name: Run tox
run: make check-tox
- name: Check translations
run: make check-translations
- name: Run unit tests
run: coverage run -m unittest discover
env:
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
ADDON_PROFILE: ${{ secrets.ADDON_PROFILE }}
# - name: Run addon service for 10 seconds
# run: timeout --preserve-status -s SIGINT 10 coverage run -a service_entry.py
# env:
# ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
# ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
- name: Upload code coverage to CodeCov
uses: codecov/codecov-action@v1
continue-on-error: true