[release] Release v0.7 #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| # Pre-release tags (e.g. 0.7-dev0) ship before the changelog is finalized, | |
| # so only enforce the heading on stable releases. | |
| if [[ "$TAG_VERSION" == *-dev* ]]; then | |
| echo "Pre-release ($TAG_VERSION); skipping changelog heading check." | |
| elif ! 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 |