2021-04-10 22:05:12 +00:00
|
|
|
name: Python test
|
2020-10-24 12:56:58 +00:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2021-04-07 21:21:46 +00:00
|
|
|
test-macos:
|
2020-10-24 12:56:58 +00:00
|
|
|
|
2021-04-07 21:08:48 +00:00
|
|
|
runs-on: macos-latest
|
2021-04-07 22:09:51 +00:00
|
|
|
timeout-minutes: 15
|
2020-10-24 12:56:58 +00:00
|
|
|
strategy:
|
2021-04-07 22:09:51 +00:00
|
|
|
fail-fast: false
|
2020-10-24 12:56:58 +00:00
|
|
|
matrix:
|
2024-03-23 11:17:24 +00:00
|
|
|
python-version: [3.8, 3.9, 3.11]
|
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 }}
|
2024-03-31 17:02:57 +00:00
|
|
|
- name: Setup poetry
|
|
|
|
uses: Gr1N/setup-poetry@v8
|
2020-10-26 21:36:01 +00:00
|
|
|
- name: Install Python dependencies
|
2024-03-31 17:01:09 +00:00
|
|
|
run: poetry install --with=dev
|
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
|
2024-03-31 17:04:39 +00:00
|
|
|
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
2020-10-24 12:56:58 +00:00
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
2024-03-31 17:04:39 +00:00
|
|
|
poetry run flake8 . --count --ignore=E402,E226,E24,W50,W690 --max-complexity=25 --max-line-length=127 --statistics
|
2020-10-24 15:16:41 +00:00
|
|
|
- name: Test with unittest
|
2021-04-08 19:41:21 +00:00
|
|
|
if: ${{ always() }}
|
2021-04-07 22:09:51 +00:00
|
|
|
timeout-minutes: 10
|
2020-10-24 12:56:58 +00:00
|
|
|
run: |
|
2024-03-31 17:04:39 +00:00
|
|
|
poetry run python -m sounddevice
|
|
|
|
poetry run python -m unittest
|
2021-04-07 21:17:10 +00:00
|
|
|
- name: Archive test logs
|
2021-04-07 21:25:39 +00:00
|
|
|
if: ${{ always() }}
|
2024-03-31 17:01:09 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-04-07 21:15:24 +00:00
|
|
|
with:
|
2021-04-07 22:09:51 +00:00
|
|
|
name: Logs - Python ${{ matrix.python-version }}
|
2021-04-07 21:15:24 +00:00
|
|
|
path: |
|
|
|
|
logs/*
|
|
|
|
|
|
|
|
|