-
Notifications
You must be signed in to change notification settings - Fork 26
72 lines (57 loc) · 1.97 KB
/
addon-validations.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
65
66
67
68
69
70
71
72
name: Add-on Validations
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
addon-validations:
if: github.repository == 'XBMC-Addons/service.xbmc.versioncheck'
runs-on: ubuntu-latest
name: Add-on Validations
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout Add-on
uses: actions/checkout@v3
with:
path: ${{ github.event.repository.name }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet
python -m pip install --upgrade pip
python -m pip install jsonschema
python -m pip install pylint
python -m pip install git+https://github.com/xbmc/addon-check.git
- name: Kodi Add-on Checker (Leia)
id: kodi-addon-checker-leia
run: |
kodi-addon-checker ${{ github.event.repository.name }} --branch=leia
- name: Staging for Matrix
run: |
xmlstarlet ed -L -u '//import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
working-directory: ${{ github.event.repository.name }}
- name: Kodi Add-on Checker (Matrix)
id: kodi-addon-checker-matrix
run: |
kodi-addon-checker ${{ github.event.repository.name }} --branch=matrix
- name: Re-staging Repository
run: |
git reset
git checkout .
git clean -fdx
working-directory: ${{ github.event.repository.name }}
- name: Pylint
id: pylint
run: |
cp -t ${HOME} .pylintrc
pylint --ignore=distro resources/lib/
working-directory: ${{ github.event.repository.name }}
- name: JSONSchema
id: jsonschema
run: |
jsonschema -i resources/versions.txt resources/versions.schema.txt
working-directory: ${{ github.event.repository.name }}