feat: Add new tests for CLI, video analysis, and GPU streaming, and r… #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**/*.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/testing.yml' | |
| - 'README.md' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '**/*.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/testing.yml' | |
| - 'README.md' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install system packages (ffmpeg/OpenCV runtime) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg libgl1 libglib2.0-0 libsm6 libxext6 | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . pytest pytest-cov | |
| - name: Run tests with coverage | |
| run: | | |
| pytest -v --cov=src/shorts_maker --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |