fa90644f61
This PR includes: - Migrate test/ to tests/ - Remove codecov (use the organization's default)
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
tests:
|
|
name: Unit tests
|
|
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 pylint
|
|
run: |
|
|
make check-pylint
|
|
- name: Run tox
|
|
run: |
|
|
make check-tox
|
|
- name: Check translations
|
|
run: |
|
|
make check-translations
|
|
- name: Run unit tests
|
|
env:
|
|
ADDON_USERNAME: ${{ secrets.ADDON_USERNAME }}
|
|
ADDON_PASSWORD: ${{ secrets.ADDON_PASSWORD }}
|
|
run: |
|
|
coverage run -m unittest discover
|
|
- name: Run addon
|
|
run: |
|
|
coverage run -a tests/run.py /
|
|
- name: Run add-on service
|
|
run: |
|
|
coverage run -a service_entry.py
|
|
- name: Upload code coverage to CodeCov
|
|
uses: codecov/codecov-action@v1
|
|
continue-on-error: true
|