Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kodi add-on checker workflow #1183

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}/
23 changes: 13 additions & 10 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 Expand Up @@ -90,12 +87,18 @@ jobs:
run: coverage run -a tests/run.py /
if: always()
- name: Upload code coverage to CodeCov
if: contains(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v3
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'
- name: Analyze with SonarCloud
if: contains(matrix.os, 'ubuntu')
uses: SonarSource/sonarcloud-github-action@v1.8
uses: SonarSource/sonarcloud-github-action@v3
with:
args: >
-Dsonar.organization=add-ons
Expand Down
Loading