diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 35d3610..17491c0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,4 +36,6 @@ jobs: pip install -r requirements-dev.txt - name: Running ruff - run: ruff check vsscale + run: | + ruff check vsscale + ruff check tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ec72bad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test + +on: [push, pull_request] + +jobs: + windows: + runs-on: windows-latest + strategy: + matrix: + versions: + - 68 + python-version: + - '3.12' + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install vapoursynth-portable==${{ matrix.versions }} + pip install -r requirements.txt + pip install -r requirements-dev.txt + - name: Running tests + run: pytest --cov-report=term-missing:skip-covered --cov=vstools tests diff --git a/.gitignore b/.gitignore index 065ce53..2468aff 100644 --- a/.gitignore +++ b/.gitignore @@ -128,8 +128,9 @@ dmypy.json # Local test file *test*.py -# vscode folder +# Editor local configs .vscode +.idea # vsjet folder .vsjet/ diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..a635c5c --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +pythonpath = . diff --git a/requirements-dev.txt b/requirements-dev.txt index a2f94d9..20e28d7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,5 @@ packaging>=24.0 pycodestyle>=2.11.1 +pytest>=7.3.1 +pytest-cov>=5.0.0 ruff>=0.6.5