Skip to content

Fix tests

Fix tests #99

Workflow file for this run

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: [3.7, 3.8, 3.9]
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"
sudo pip install coverage
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 addon using cli
run: coverage run -a tests/run.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.regiotv
sources: resources/lib/
tests: tests/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true