Skip to content

ci: include scripts folder to lint ci (#199) #1515

ci: include scripts folder to lint ci (#199)

ci: include scripts folder to lint ci (#199) #1515

Workflow file for this run

name: Test Python code
on:
push:
branches:
- main
paths:
- ".github/actions/**"
- ".github/workflows/test.yml"
- "**.py"
- "pyproject.toml"
pull_request:
paths:
- ".github/actions/**"
- ".github/workflows/test.yml"
- "**.py"
- "pyproject.toml"
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
vapoursynth-version: [72]
python-version: ["3.12", "3.14"]
vszip-version: [10]
fmtc-version: [30]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Set up VapourSynth ${{ matrix.vapoursynth-version }}
uses: Jaded-Encoding-Thaumaturgy/setup-vapoursynth@v1
with:
vapoursynth-version: ${{ matrix.vapoursynth-version }}
python-version: ${{ matrix.python-version }}
- name: Set up akarin
uses: ./.github/actions/setup-akarin
with:
akarin-version: 6d7c733b3014a42be75299427b5c35f56f02a47a
- name: Set up vszip
uses: ./.github/actions/setup-vszip
with:
vszip-version: ${{ matrix.vszip-version }}
- name: Set up fmtc
uses: ./.github/actions/setup-fmtc
with:
fmtc-version: ${{ matrix.fmtc-version }}
- name: Install dependencies
run: uv sync --locked
- name: Run tests
run: uv run pytest --cov-report=term-missing:skip-covered --cov=vskernels --cov=vstools --cov=vsexprtools tests
- name: Convert coverage report to cobertura
run: uv run coverage xml
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.3.6
with:
file: coverage.xml
format: cobertura
parallel: true
flag-name: ${{ join(matrix.*, ' - ') }}
fail-on-error: false
- name: Post webhook for failure
if: failure()
uses: Jaded-Encoding-Thaumaturgy/discord-failure-notifier@v1
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
post-test:
needs: [test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Mark Coveralls as finished
uses: coverallsapp/github-action@v2.3.6
with:
parallel-finished: true
fail-on-error: false