Skip to content

fix(openai-chat): read ogg, opus, flac, aac, aiff, webm and mpeg input_audio as their true media types #2

fix(openai-chat): read ogg, opus, flac, aac, aiff, webm and mpeg input_audio as their true media types

fix(openai-chat): read ogg, opus, flac, aac, aiff, webm and mpeg input_audio as their true media types #2

Workflow file for this run

name: python
on:
push:
pull_request:
# The test pipeline only reads the checkout; never grant it more.
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Check out pinned contract
# Tests import the shared cloud vectors during collection.
run: |
PIN=$(tr -d '[:space:]' < CONTRACT_PIN)
[[ "$PIN" =~ ^[0-9a-f]{40}$ ]] || { echo 'Invalid CONTRACT_PIN'; exit 1; }
git clone --no-checkout https://github.com/lm15-dev/lm15-contract.git ../lm15-contract
git -C ../lm15-contract checkout --detach "$PIN"
if [ ! -e ../lm15-python ]; then
ln -s "$GITHUB_WORKSPACE" ../lm15-python
fi
- name: Install
run: python -m pip install -e . pytest pytest-asyncio pyyaml
- name: Tests
run: python -m pytest tests/ -q
- name: Conformance (strict)
run: python conformance/run_all.py --strict
- name: Contract harness (pinned)
# Cross-repo gate: run the lm15-contract vet harness against this
# checkout at the SHA pinned in CONTRACT_PIN (bump discipline in
# CONTRIBUTING.md). The contract's shim registry expects the
# reference at the sibling path ../lm15-python with a .venv.
run: |
test -z "$(git -C ../lm15-contract status --porcelain --untracked-files=all)"
python -m venv .venv && .venv/bin/pip install -q -e .
python ../lm15-contract/harness/check.py --shim python --direction all
- name: Vet shim smoke test
# Skips itself when the lm15-contract corpus is not checked out as a
# sibling (its pytestmark handles that); still proves the shim imports
# and speaks the JSONL framing.
run: |
if [ -f tests/test_vet_shim.py ]; then
python -m pytest tests/test_vet_shim.py -q
else
echo "tests/test_vet_shim.py not present; skipping"
fi
- name: Contract checkout stays clean
if: always()
run: |
test -d ../lm15-contract/.git
test -z "$(git -C ../lm15-contract status --porcelain --untracked-files=all)"