Skip to content

Empty groups

Empty groups #1188

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ main ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
sudo apt install libgirepository1.0-dev libcairo2-dev libdbus-glib-1-dev # required for dbus
python -m pip install --upgrade pip
pip install pylint mypy pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pylint
run: |
pylint --exit-zero amplipi --generated-members "signal.Signals,GPIO.*"
pylint -E amplipi --generated-members "signal.Signals,GPIO.*"
- name: Lint with mypy, static type checker
run: |
mypy amplipi/ --ignore-missing-imports
- name: Test mock using pytest # rpi cannot be tested directly due to hardware...
run: |
pytest tests/test_ctrl.py -vvv -k no_config
pytest tests/test_ctrl.py -vvv -k good_config
pytest tests/test_ctrl.py -vvv -k corrupted_config
pytest tests/test_ctrl.py -vvv -k doubly_corrupted_config
pytest tests/test_ctrl.py -vvv -k missing_config
pytest tests/test_ctrl.py -vvv -k doubly_missing_config
pytest tests/test_rest.py -vvv -k 'not _live' --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: ./coverage.xml
directory: ./coverage/reports/
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
path_to_write_report: ./coverage/codecov_report.txt