Skip to content

Commit

Permalink
Update Kodi add-on checker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister committed Sep 17, 2024
1 parent cabc420 commit a0a0b9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/addon-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@

name: Kodi
on:
- pull_request
- push
# Run action when pushed to master, or for commits in a pull request.
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: Addon checker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kodi-branch: [krypton, leia, matrix]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -23,18 +26,10 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get install xmlstarlet
python -m pip install --upgrade pip
pip install git+https://github.com/xbmc/addon-check.git
- name: Remove unwanted files
run: awk '/export-ignore/ { print $1 }' .gitattributes | xargs rm -rf --
working-directory: ${{ github.repository }}
- name: Rewrite addon.xml for older versions
run: |
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v "2.25.0" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version%'+matrix.1'}" addon.xml
working-directory: ${{ github.repository }}
if: matrix.kodi-branch == 'krypton' || matrix.kodi-branch == 'leia'
- name: Run kodi-addon-checker
run: kodi-addon-checker --branch=${{ matrix.kodi-branch }} ${{ github.repository }}/
run: kodi-addon-checker --branch=matrix ${{ github.repository }}/
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
env:
PYTHONIOENCODING: utf-8
PYTHONPATH: ${{ github.workspace }}/resources/lib:${{ github.workspace }}/tests
PYPI-HOSTS: "pypi.python.org pypi.org files.pythonhosted.org"
strategy:
fail-fast: false
matrix:
Expand All @@ -37,19 +38,15 @@ jobs:
steps:
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
uses: actions/checkout@v4
- name: Ignore certificate verification on Python 3.5
shell: bash
run: >
# INSECURE!! But it should be OK for CI tests.
echo 'PIP_TRUSTED_HOST=pypi.python.org pypi.org
files.pythonhosted.org' >>$GITHUB_ENV
- name: Setup PYTHONPATH (windows)
if: contains(matrix.os, 'windows')
run: echo "PYTHONPATH=${env:PYTHONPATH};${env:GITHUB_WORKSPACE};${env:GITHUB_WORKSPACE}\resources\lib;${env:GITHUB_WORKSPACE}\tests" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append
- name: 'Set up Python ${{ matrix.python-version }}'
uses: MatteoH2O1999/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
env:
PIP_TRUSTED_HOST: ${{ contains(fromJson('["3.5"]'), matrix.python-version) && env.PYPI-HOSTS || '' }}
- name: Install dependencies (linux)
if: contains(matrix.os, 'ubuntu')
run: |
Expand Down

0 comments on commit a0a0b9e

Please sign in to comment.