Skip to content

Fix Pre-Commit Issue #173

Fix Pre-Commit Issue

Fix Pre-Commit Issue #173

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python Application Test
on:
push:
paths-ignore:
- "**.css"
- "**.js"
- "**.md"
branches:
- '**'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- "**.css"
- "**.js"
- "**.md"
branches:
- '**'
jobs:
# Run pre-commit Checks
pre-commit:
name: Pre Commit Checks
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.10'
- name: Run Pre Commit Checks
uses: pre-commit/[email protected]
# Run Test Coverage
test-coverage:
needs: [pre-commit]
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
# Set Python versions to test against
matrix:
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install -y portaudio19-dev xvfb
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run main.py with Xvfb
run: |
sudo Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99
timeout 10s python main.py || true
continue-on-error: ${{ matrix.python-version == '3.13' }}