-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (64 loc) · 1.97 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
'on':
push:
branches:
- master
pull_request_target:
types: [ opened, edited, synchronize ]
branches:
- master
jobs:
tests:
name: Add-on testing
runs-on: '${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python-version:
- '3.8'
- '3.9'
- '3.10'
include:
- os: ubuntu-20.04
python-version: '3.6'
- os: ubuntu-20.04
python-version: '3.7'
steps:
- name: 'Check out ${{ github.sha }} from repository ${{ github.repository }}'
uses: actions/checkout@v4
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
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@v4
continue-on-error: true
env:
OS: '${{ matrix.os }}'
PYTHON: '${{ matrix.python-version }}'
with:
token: '${{ secrets.CODECOV_TOKEN }}'
flags: unittests
env_vars: 'OS,PYTHON'