Skip to content

Commit 7a0751f

Browse files
committed
[build] Finalize release test workflow
1 parent a42aeba commit 7a0751f

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/release-test.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
pip install build twine pip-audit
2222
- name: Version consistency check
2323
run: |
24-
VERSION=$(python -c "import scenedetect; print(scenedetect.__version__)")
24+
# Parse __version__ directly so we don't have to install scenedetect
25+
# (importing it triggers a cv2-availability guard).
26+
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)))")
2527
echo "scenedetect.__version__ = $VERSION"
2628
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
2729
TAG_VERSION=${GITHUB_REF#refs/tags/v}
@@ -37,10 +39,16 @@ jobs:
3739
fi
3840
- name: Build and Check
3941
run: |
40-
python -m build
41-
twine check dist/*
42+
# Build to a clean output dir — `dist/` already holds tracked installer
43+
# scripts and config (e.g. dist/generate_assets.py, dist/installer/),
44+
# so `twine check dist/*` would try to validate non-distribution files.
45+
python -m build --outdir build-dist
46+
twine check build-dist/*
4247
- name: pip-audit
43-
run: pip-audit
48+
# CVE-2026-3219 in pip 26.0.1 has no fix version available upstream
49+
# and pip ships pre-installed on the runner (not controlled by this
50+
# project). Re-evaluate when pip publishes a fix.
51+
run: pip-audit --ignore-vuln CVE-2026-3219
4452

4553
release-tests:
4654
needs: static
@@ -114,11 +122,11 @@ jobs:
114122
- name: Build wheel
115123
run: |
116124
pip install build
117-
python -m build --wheel
125+
python -m build --wheel --outdir build-dist
118126
- name: Test Bare Install
119127
shell: bash
120128
run: |
121-
WHEEL=$(ls dist/*.whl)
129+
WHEEL=$(ls build-dist/*.whl)
122130
PY=${{ matrix.os == 'windows-latest' && 'venv_bare/Scripts/python' || 'venv_bare/bin/python' }}
123131
PYTEST=${{ matrix.os == 'windows-latest' && 'venv_bare/Scripts/pytest' || 'venv_bare/bin/pytest' }}
124132
python -m venv venv_bare
@@ -127,7 +135,7 @@ jobs:
127135
- name: Test OpenCV Install
128136
shell: bash
129137
run: |
130-
WHEEL=$(ls dist/*.whl)
138+
WHEEL=$(ls build-dist/*.whl)
131139
PY=${{ matrix.os == 'windows-latest' && 'venv_opencv/Scripts/python' || 'venv_opencv/bin/python' }}
132140
PYTEST=${{ matrix.os == 'windows-latest' && 'venv_opencv/Scripts/pytest' || 'venv_opencv/bin/pytest' }}
133141
python -m venv venv_opencv
@@ -136,7 +144,7 @@ jobs:
136144
- name: Test PyAV Install
137145
shell: bash
138146
run: |
139-
WHEEL=$(ls dist/*.whl)
147+
WHEEL=$(ls build-dist/*.whl)
140148
PY=${{ matrix.os == 'windows-latest' && 'venv_pyav/Scripts/python' || 'venv_pyav/bin/python' }}
141149
PYTEST=${{ matrix.os == 'windows-latest' && 'venv_pyav/Scripts/pytest' || 'venv_pyav/bin/pytest' }}
142150
python -m venv venv_pyav

0 commit comments

Comments
 (0)