Skip to content

Merge pull request #66 from vcon-dev/fixes-tasks-in-gitignore #76

Merge pull request #66 from vcon-dev/fixes-tasks-in-gitignore

Merge pull request #66 from vcon-dev/fixes-tasks-in-gitignore #76

Workflow file for this run

# 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 vcon unit test
on:
push:
#branches: [ $default-branch ]
pull_request:
# all PRs for now
#branches: [ $default-branch ]
jobs:
vcon-utest-python-version:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: checkout ${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} os ${{ runner.os }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
# This does not seem to actually load the pip dev packages. However
# leaving this in so that it does not pull in **/requirements.txt
cache-dependency-path: vcon/docker_dev/pip_dev_package_list.txt
- name: Install dependencies
run: |
pwd
ls -l vcon/docker_dev
# Pull out comments and python3 specific packages as the platform already has that
sudo apt-get update
apt-cache madison ffmpeg
apt-cache depends ffmpeg
apt-cache depends ffmpeg=7:4.4.1-3ubuntu5
apt-cache depends ffmpeg=7:4.4.2-0ubuntu0.22.04.1
apt-cache depends ffmpeg=7:4.4.2-0ubuntu0.22.04.1
apt-cache madison intel-media-va-driver
apt-cache depends intel-media-va-driver
echo "Installing apt packages: " $(grep -vE "^\s*#" vcon/docker_dev/apt_package_list.txt | grep -v python3 | tr "\n" " ")
sudo apt-get install -y --fix-missing $(grep -vE "^\s*#" vcon/docker_dev/apt_package_list.txt | grep -v python3 | tr "\n" " ")
python -m pip install --upgrade pip
pip install -r vcon/docker_dev/pip_dev_package_list.txt
pip install -r vcon/docker_dev/pip_package_list.txt
#pip install -r vcon/docker_dev/pip_server_requirements.txt
pip freeze | grep stable
pip freeze | grep whisper
python3 -c "import stable_whisper;print(stable_whisper.__version__)"
- name: Lint catastrophic errors with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
# TODO: need to get to the point where we can run this without exit-zero
flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics
- name: Lint stylistic errors with flake8
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --ignore=E111,E114,E121,E123,E126,E128,E251,E261,E265,E275 --max-complexity=10 --max-line-length=127 --statistics
- name: Test Vcon core package with pytest
run: |
# Run all Vcon package unit tests
pytest -v -rP tests