Skip to content

Commit eda8146

Browse files
committed
add ci tests
1 parent aa2ca28 commit eda8146

4 files changed

Lines changed: 154 additions & 136 deletions

File tree

.github/workflows/linux.yml

Lines changed: 0 additions & 136 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test:
15+
name: Test (Python ${{ matrix.python-version }}, VS ${{ matrix.vapoursynth-version }})
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
vapoursynth-version: [69, 70, 71, 72, 73]
21+
python-version: ["3.12", "3.13", "3.14"]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v6
26+
27+
- name: Set up uv
28+
uses: astral-sh/setup-uv@v7
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
enable-cache: true
32+
33+
- name: Set up VapourSynth ${{ matrix.vapoursynth-version }}
34+
uses: Jaded-Encoding-Thaumaturgy/setup-vapoursynth@v1
35+
with:
36+
vapoursynth-version: ${{ matrix.vapoursynth-version }}
37+
python-version: ${{ matrix.python-version }}
38+
39+
- name: Install dependencies
40+
run: uv sync --all-extras --locked
41+
42+
- name: Run tests with coverage
43+
run: uv run pytest tests --cov=vsengine --cov-report=xml
44+
45+
- name: Upload coverage to coveralls
46+
uses: coverallsapp/github-action@v2.3.7
47+
with:
48+
file: coverage.xml
49+
format: cobertura
50+
parallel: true
51+
flag-name: ${{ join(matrix.*, ' - ') }}
52+
fail-on-error: false
53+
54+
coverage-finished:
55+
name: Coverage Finished
56+
needs: test
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Upload coverage to Coveralls (finish)
60+
uses: coverallsapp/github-action@v2.3.7
61+
with:
62+
parallel-finished: true
63+
fail-on-error: false

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ trio = ["trio"]
4040
dev = [
4141
"mypy>=1.19.0",
4242
"pytest>=9.0.1",
43+
"pytest-cov>=7.0.0",
4344
"pytest-asyncio>=0.24.0",
4445
"ruff>=0.14.7",
4546
"trio",

0 commit comments

Comments
 (0)