name: Python test on: [push] jobs: test-macos: runs-on: macos-latest timeout-minutes: 15 strategy: fail-fast: false matrix: python-version: [3.8, 3.9, 3.11] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Setup poetry uses: Gr1N/setup-poetry@v8 - name: Install Python dependencies run: poetry install --with=dev - 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 # 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 - name: Test with unittest if: ${{ always() }} timeout-minutes: 10 run: | poetry run python -m sounddevice poetry run python -m unittest - name: Archive test logs if: ${{ always() }} uses: actions/upload-artifact@v4 with: name: Logs - Python ${{ matrix.python-version }} path: | logs/*