Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/workflows/run_pytest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
name: Lint
name: Python Fast Unit Tests

on: [push, pull_request]
on:
push:
branches: [ main ]
paths:
- pyproject.toml
- .github/workflows/run_pytest.yml
- aisuite/**
- tests/**
pull_request:
branches: [ main ]
paths:
- pyproject.toml
- .github/workflows/run_pytest.yml
- aisuite/**
- tests/**

env:
POETRY_VERSION=2.2.1

jobs:
build_and_test:
Expand All @@ -9,16 +26,16 @@ jobs:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ env.POETRY_VERSION }}
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --all-extras --with test
run: poetry install --all-extras --with test
- name: Test with pytest
run: poetry run pytest -m "not integration"

run: poetry run pytest -m "not integration and not long and not slow"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohitprasad15 Consider adding not llm in here as well -- slow tests should not run at each PR (scheduled run instead)