Skip to content

Add pytest for YouTube agent #12

Add pytest for YouTube agent

Add pytest for YouTube agent #12

Workflow file for this run

name: tests
on: [pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Set up Python
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Set up pip cache
- name: Set up pip cache
if: runner.os == 'Linux'
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
# Install Hatch
- name: Install Hatch
run: pipx install hatch
# Install pytest-asyncio for async test support
- name: Install pytest-asyncio
run: pip install pytest-asyncio
# Run tests with OpenAI API key
- name: Run tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: hatch test