2020-03-26 11:31:28 +01:00
|
|
|
name: Kodi
|
|
|
|
on:
|
2020-05-11 14:12:13 +02:00
|
|
|
- pull_request
|
|
|
|
- push
|
2020-03-26 11:31:28 +01:00
|
|
|
jobs:
|
|
|
|
tests:
|
2020-05-11 14:12:13 +02:00
|
|
|
name: Addon checker
|
2020-03-26 11:31:28 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
kodi-branch: [leia, matrix]
|
|
|
|
steps:
|
2020-05-11 14:12:13 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-03-26 11:31:28 +01:00
|
|
|
with:
|
|
|
|
path: ${{ github.repository }}
|
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-05-11 14:12:13 +02:00
|
|
|
sudo apt-get install xmlstarlet
|
2020-03-26 11:31:28 +01:00
|
|
|
python -m pip install --upgrade pip
|
2020-05-11 14:12:13 +02:00
|
|
|
# FIXME: Requires changes from xbmc/addon-check#217
|
|
|
|
#pip install kodi-addon-checker
|
|
|
|
pip install git+git://github.com/xbmc/addon-check.git@master
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Remove unwanted files
|
|
|
|
run: awk '/export-ignore/ { print $1 }' .gitattributes | xargs rm -rf --
|
|
|
|
working-directory: ${{ github.repository }}
|
|
|
|
- name: Rewrite addon.xml for Matrix
|
2020-05-11 14:12:13 +02:00
|
|
|
run: |
|
|
|
|
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
|
|
|
|
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
|
|
|
|
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.99" addon.xml
|
2020-03-26 11:31:28 +01:00
|
|
|
working-directory: ${{ github.repository }}
|
|
|
|
if: matrix.kodi-branch == 'matrix'
|
|
|
|
- name: Run kodi-addon-checker
|
2020-05-11 14:12:13 +02:00
|
|
|
run: kodi-addon-checker --branch=${{ matrix.kodi-branch }} ${{ github.repository }}/
|