2020-03-23 19:58:55 +01:00
|
|
|
name: CI
|
|
|
|
on:
|
2020-05-11 14:12:13 +02:00
|
|
|
- pull_request
|
|
|
|
- push
|
2020-03-23 19:58:55 +01:00
|
|
|
jobs:
|
|
|
|
tests:
|
2020-05-11 14:12:13 +02:00
|
|
|
name: Add-on testing
|
2020-03-23 19:58:55 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-26 11:31:28 +01:00
|
|
|
env:
|
|
|
|
PYTHONIOENCODING: utf-8
|
2020-04-01 12:42:04 +02:00
|
|
|
PYTHONPATH: ${{ github.workspace }}/resources/lib:${{ github.workspace }}/tests
|
2020-03-23 19:58:55 +01:00
|
|
|
strategy:
|
2020-03-26 11:31:28 +01:00
|
|
|
fail-fast: false
|
2020-03-23 19:58:55 +01:00
|
|
|
matrix:
|
|
|
|
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
|
|
|
|
steps:
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
|
|
|
|
uses: actions/checkout@v2
|
2020-03-23 19:58:55 +01:00
|
|
|
- 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
|
2020-03-26 11:31:28 +01:00
|
|
|
sudo pip install coverage --install-option="--install-scripts=/usr/bin"
|
2020-03-23 19:58:55 +01:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Run pylint
|
2020-05-11 14:12:13 +02:00
|
|
|
run: make check-pylint
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Run tox
|
2020-05-11 14:12:13 +02:00
|
|
|
run: make check-tox
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Check translations
|
2020-05-11 14:12:13 +02:00
|
|
|
run: make check-translations
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Run unit tests
|
2020-05-11 14:12:13 +02:00
|
|
|
run: coverage run -m unittest discover
|
2020-03-23 19:58:55 +01:00
|
|
|
env:
|
2020-05-11 14:12:13 +02:00
|
|
|
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
|
2020-03-23 19:58:55 +01:00
|
|
|
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
|
2020-05-11 14:12:13 +02:00
|
|
|
- name: Run addon service
|
|
|
|
run: coverage run -a service_entry.py
|
|
|
|
env:
|
2020-03-23 19:58:55 +01:00
|
|
|
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
|
2020-05-11 14:12:13 +02:00
|
|
|
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
|
2020-03-26 11:31:28 +01:00
|
|
|
- name: Upload code coverage to CodeCov
|
2020-03-23 19:58:55 +01:00
|
|
|
uses: codecov/codecov-action@v1
|
2020-04-01 12:42:04 +02:00
|
|
|
continue-on-error: true
|