-
Notifications
You must be signed in to change notification settings - Fork 486
106 lines (102 loc) · 3.75 KB
/
release-test.yml
File metadata and controls
106 lines (102 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Release Test Suite
on:
workflow_dispatch:
push:
tags:
- 'v*-release'
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine pip-audit
- name: Version consistency check
run: |
# Parse __version__ directly so we don't have to install scenedetect
# (importing it triggers a cv2-availability guard).
VERSION=$(python -c "import ast,pathlib; print(next(n.value.value for n in ast.parse(pathlib.Path('scenedetect/__init__.py').read_text()).body if isinstance(n, ast.Assign) and any(getattr(t,'id',None)=='__version__' for t in n.targets)))")
echo "scenedetect.__version__ = $VERSION"
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG_VERSION=${GITHUB_REF#refs/tags/v}
TAG_VERSION=${TAG_VERSION%-release}
if [[ "$VERSION" != "$TAG_VERSION" ]]; then
echo "Version mismatch: scenedetect=$VERSION, tag=$TAG_VERSION"
exit 1
fi
if ! grep -q "^## PySceneDetect $TAG_VERSION" website/pages/changelog.md; then
echo "Changelog is missing a '## PySceneDetect $TAG_VERSION' heading"
exit 1
fi
fi
- name: Build and Check
run: |
python -m build
python packaging/build_headless.py
python -m build
git checkout pyproject.toml
twine check dist/*
- name: pip-audit
# CVE-2026-3219 in pip 26.0.1 has no fix version available upstream
# and pip ships pre-installed on the runner (not controlled by this
# project). Re-evaluate when pip publishes a fix.
run: pip-audit --ignore-vuln CVE-2026-3219
release-tests:
needs: static
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.13']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Checkout resources branch
run: |
git fetch --depth=1 origin refs/heads/resources:refs/remotes/origin/resources
git checkout refs/remotes/origin/resources -- tests/resources/
git reset
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install ffmpeg
uses: ./.github/actions/setup-ffmpeg
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[pyav,moviepy]
pip install opentimelineio pillow psutil pytest
- name: Run release tests
run: pytest -m release -vv --ignore=tests/release/test_long_video_stress.py
long-stress:
needs: static
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Checkout resources branch
run: |
git fetch --depth=1 origin refs/heads/resources:refs/remotes/origin/resources
git checkout refs/remotes/origin/resources -- tests/resources/
git reset
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
cache: 'pip'
- name: Install ffmpeg
uses: ./.github/actions/setup-ffmpeg
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[pyav]
pip install psutil pytest
- name: Run long stress test
run: pytest -m release -k long_video -vv