Skip to content

feat: add ability to disable decorator extensions via config.json #25

feat: add ability to disable decorator extensions via config.json

feat: add ability to disable decorator extensions via config.json #25

Workflow file for this run

# Example GitHub Actions Workflow for TTS WebUI Tests
#
# This is a template workflow that can be used to run tests in CI/CD.
# To use this, copy it to .github/workflows/tests.yml and adjust as needed.
name: Tests
on:
push:
branches: [ main, develop, tests ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: ['ubuntu-latest']
# python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.10']
# Exclude some combinations to speed up CI
# exclude:
# - os: macos-latest
# python-version: '3.8'
# - os: windows-latest
# python-version: '3.8'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Run unit tests
run: |
pytest -m unit -v --tb=short
- name: Run integration tests
run: |
pytest -m integration -v --tb=short
- name: Run all tests with coverage
run: |
pytest --cov=tts_webui --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install linting tools
run: |
pip install flake8 black isort mypy
- name: Check code formatting with black
run: |
black --check tts_webui tests
- name: Check import order with isort
run: |
isort --check-only tts_webui tests
- name: Lint with flake8
run: |
flake8 tts_webui tests --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 tts_webui tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type check with mypy (optional)
continue-on-error: true
run: |
mypy tts_webui --ignore-missing-imports