|
1
|
name: CI |
|
2
|
|
|
3
|
on: |
|
4
|
push: |
|
5
|
branches: [main] |
|
6
|
pull_request: |
|
7
|
branches: [main] |
|
8
|
|
|
9
|
jobs: |
|
10
|
test: |
|
11
|
runs-on: ${{ matrix.os }} |
|
12
|
strategy: |
|
13
|
matrix: |
|
14
|
os: [ubuntu-latest, macos-latest] |
|
15
|
python-version: ["3.10", "3.11", "3.12", "3.13"] |
|
16
|
steps: |
|
17
|
- uses: actions/checkout@v6 |
|
18
|
|
|
19
|
- name: Set up Python ${{ matrix.python-version }} |
|
20
|
uses: actions/setup-python@v6 |
|
21
|
with: |
|
22
|
python-version: ${{ matrix.python-version }} |
|
23
|
|
|
24
|
- name: Install system dependencies (Ubuntu) |
|
25
|
if: runner.os == 'Linux' |
|
26
|
run: | |
|
27
|
sudo apt-get update |
|
28
|
sudo apt-get install -y ffmpeg libsndfile1 |
|
29
|
|
|
30
|
- name: Install system dependencies (macOS) |
|
31
|
if: runner.os == 'macOS' |
|
32
|
run: brew install ffmpeg libsndfile |
|
33
|
|
|
34
|
- name: Install Python dependencies |
|
35
|
run: | |
|
36
|
python -m pip install --upgrade pip |
|
37
|
pip install -e ".[dev]" |
|
38
|
|
|
39
|
- name: Run tests |
|
40
|
run: pytest tests/ -v --tb=short |
|
41
|
|
|
42
|
- name: Check code style |
|
43
|
run: ruff check video_processor/ |
|
44
|
|
|
45
|
lint: |
|
46
|
runs-on: ubuntu-latest |
|
47
|
steps: |
|
48
|
- uses: actions/checkout@v6 |
|
49
|
|
|
50
|
- uses: actions/setup-python@v6 |
|
51
|
with: |
|
52
|
python-version: "3.12" |
|
53
|
|
|
54
|
- name: Install dependencies |
|
55
|
run: | |
|
56
|
pip install ruff mypy |
|
57
|
|
|
58
|
- name: Ruff |
|
59
|
run: ruff check video_processor/ |
|
60
|
|
|
61
|
- name: Type check |
|
62
|
run: mypy video_processor/ --ignore-missing-imports || true |
|
63
|
|