BAPSicle/.github/workflows/test.yaml

46 lines
1.3 KiB
YAML
Raw Normal View History

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
runs-on: macos-latest
timeout-minutes: 15
2020-10-24 12:56:58 +00:00
strategy:
fail-fast: false
2020-10-24 12:56:58 +00:00
matrix:
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
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
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
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() }}
timeout-minutes: 10
2020-10-24 12:56:58 +00:00
run: |
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() }}
uses: actions/upload-artifact@v4
2021-04-07 21:15:24 +00:00
with:
name: Logs - Python ${{ matrix.python-version }}
2021-04-07 21:15:24 +00:00
path: |
logs/*