Repository navigation
feat(video-validation): add lightweight semantic pre-validator contract #7
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: Semantic Prevalidator CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/video_validation/**' | |
| - 'tests/test_semantic_prevalidator.py' | |
| - '.github/workflows/semantic-prevalidator-ci.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| semantic-prevalidator: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Materialize exact PR commit without git submodule cleanup | |
| env: | |
| REPOSITORY: ${{ github.repository }} | |
| SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
| run: | | |
| set -euo pipefail | |
| curl --fail --location --silent --show-error \ | |
| "https://codeload.github.com/${REPOSITORY}/tar.gz/${SHA}" \ | |
| | tar -xz --strip-components=1 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install targeted test dependency | |
| run: python -m pip install --disable-pip-version-check pytest | |
| - name: Compile targeted module | |
| run: python -m compileall -q src/video_validation tests/test_semantic_prevalidator.py | |
| - name: Run semantic prevalidator tests | |
| run: python -m pytest -q tests/test_semantic_prevalidator.py |