-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from dagwieers/github-ci
Migrate from Travis CI to GitHub CI
- Loading branch information
Showing
17 changed files
with
129 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.github/ export-ignore | ||
tests/ export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.pylintrc export-ignore | ||
Makefile export-ignore | ||
requirements.txt export-ignore | ||
tox.ini export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Kodi | ||
on: | ||
- pull_request | ||
- push | ||
jobs: | ||
tests: | ||
name: Addon checker | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kodi-branch: [leia, matrix] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: ${{ github.repository }} | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install libxml2-utils xmlstarlet | ||
python -m pip install --upgrade pip packaging | ||
# FIXME: Requires changes from xbmc/addon-check#217 | ||
#pip install kodi-addon-checker | ||
pip install git+git://github.com/xbmc/addon-check.git@master | ||
- name: Remove unwanted files | ||
run: awk '/export-ignore/ { print $1 }' .gitattributes | xargs rm -rf -- | ||
working-directory: ${{ github.repository }} | ||
- name: Rewrite addon.xml for Matrix | ||
run: xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml | ||
working-directory: ${{ github.repository }} | ||
if: matrix.kodi-branch == 'matrix' | ||
- name: Run kodi-addon-checker | ||
run: kodi-addon-checker --branch=${{ matrix.kodi-branch }} ${{ github.repository }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CI | ||
on: | ||
- pull_request | ||
- push | ||
jobs: | ||
tests: | ||
name: Add-on testing | ||
runs-on: ubuntu-latest | ||
env: | ||
PYTHONIOENCODING: utf-8 | ||
PYTHONPATH: ${{ github.workspace }}/resources/lib:${{ github.workspace }}/tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 2.7, 3.5, 3.6, 3.7, 3.8 ] | ||
steps: | ||
- name: Check out ${{ github.sha }} from repository ${{ github.repository }} | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install gettext | ||
sudo pip install coverage --install-option="--install-scripts=/usr/bin" | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run tox | ||
run: python -m tox -q -e flake8,py | ||
- name: Run pylint | ||
run: python -m pylint resources/lib/ tests/ | ||
- name: Compare translations | ||
run: make check-translations | ||
- name: Run unit tests | ||
run: coverage run -m unittest discover | ||
- name: Run script entry | ||
run: coverage run -a resources/lib/script_entry.py | ||
- name: Run service entry | ||
run: coverage run -a resources/lib/service_entry.py & | ||
- name: Upload code coverage to CodeCov | ||
uses: codecov/codecov-action@v1 | ||
continue-on-error: true | ||
# FIXME: Requires changes from SonarSource/sonarcloud-github-action#9 | ||
- name: Analyze with SonarCloud | ||
uses: dagwieers/sonarcloud-github-action@more-options | ||
with: | ||
organization: add-ons | ||
projectKey: add-ons_plugin.video.vrt.nu | ||
sources: resources/lib/ | ||
tests: tests/ | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
continue-on-error: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ coverage: | |
patch: false | ||
comment: false | ||
ignore: | ||
- test/ | ||
- tests/ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.