name: Run Tests

on: [pull_request]

permissions:
  contents: write

env:
  OPENAI_API_KEY: fake-api-key

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.11.9"

      - name: Install Requirements
        run: |
          set -e
          pip install poetry
          poetry install

      - name: Run tests
        run: poetry run pytest
