BAPSicle/.github/workflows/test.yaml

47 lines
1.3 KiB
YAML
Raw Normal View History

2020-10-24 12:56:58 +00:00
name: Python package
on: [push]
jobs:
2021-04-07 21:21:46 +00:00
test-macos:
2020-10-24 12:56:58 +00:00
runs-on: macos-latest
2020-10-24 12:56:58 +00:00
strategy:
matrix:
2021-04-07 20:01:32 +00:00
python-version: [3.7, 3.8, 3.9]
2020-10-24 12:56:58 +00:00
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
2020-10-26 21:36:01 +00:00
- name: Install Python dependencies
2020-10-24 12:56:58 +00:00
run: |
python -m pip install --upgrade pip
2020-10-24 15:17:35 +00:00
pip install flake8
pip install -r build/requirements.txt
pip install -r build/requirements-macos.txt
2020-10-24 15:16:41 +00:00
- name: Install bapsicle as module
run: |
pip install -e .
2020-10-24 12:56:58 +00:00
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2020-10-24 15:16:41 +00:00
- name: Test with unittest
2020-10-24 12:56:58 +00:00
run: |
2021-04-07 20:52:23 +00:00
python -m sounddevice
2021-04-07 20:18:00 +00:00
cp config.py.example config.py # We don't need an API config file for these tests.
2021-04-07 20:01:32 +00:00
python -m unittest
2021-04-07 21:17:10 +00:00
- name: Archive test logs
uses: actions/upload-artifact@v2
2021-04-07 21:15:24 +00:00
with:
name: Logs
path: |
logs/*