Skip to content

Converted AP1_S4Z6 and AP1_Z6 test sheets to LaTeX #1681

Converted AP1_S4Z6 and AP1_Z6 test sheets to LaTeX

Converted AP1_S4Z6 and AP1_Z6 test sheets to LaTeX #1681

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: pull_request
jobs:
python-tests:
name: Run python linting and tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2 # For codecov coverage history
- name: Make fake dist folder
run: |
mkdir web/dist
touch web/dist/index.html
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgirepository1.0-dev libcairo2-dev libdbus-1-dev # required for dbus
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pylint mypy pytest pytest-cov # Add any testing dependencies not in requirements.txt
- name: Lint with pylint
run: |
pylint --exit-zero amplipi --generated-members "signal.Signals,GPIO.*"
pylint -E amplipi --generated-members "signal.Signals,GPIO.*"
pylint -E streams
- 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
pytest tests/test_auth.py -vvv
pytest tests/test_zeroconf.py -vvv
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false