| name: Tests |
|
|
| on: |
| push: |
| branches: [main] |
| pull_request: |
| branches: [main] |
|
|
| |
| concurrency: |
| group: tests-${{ github.ref }} |
| cancel-in-progress: true |
|
|
| jobs: |
| test: |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@v4 |
|
|
| - name: Install system dependencies |
| run: sudo apt-get update && sudo apt-get install -y ripgrep |
|
|
| - name: Install uv |
| uses: astral-sh/setup-uv@v5 |
|
|
| - name: Set up Python 3.11 |
| run: uv python install 3.11 |
|
|
| - name: Install dependencies |
| run: | |
| uv venv .venv --python 3.11 |
| source .venv/bin/activate |
| uv pip install -e ".[all,dev]" |
| |
| - name: Run tests |
| run: | |
| source .venv/bin/activate |
| python -m pytest tests/ -q --ignore=tests/integration --ignore=tests/e2e --tb=short -n auto |
| env: |
| |
| OPENROUTER_API_KEY: "" |
| OPENAI_API_KEY: "" |
| NOUS_API_KEY: "" |
|
|
| e2e: |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@v4 |
|
|
| - name: Install uv |
| uses: astral-sh/setup-uv@v5 |
|
|
| - name: Set up Python 3.11 |
| run: uv python install 3.11 |
|
|
| - name: Install dependencies |
| run: | |
| uv venv .venv --python 3.11 |
| source .venv/bin/activate |
| uv pip install -e ".[all,dev]" |
| |
| - name: Run e2e tests |
| run: | |
| source .venv/bin/activate |
| python -m pytest tests/e2e/ -v --tb=short |
| env: |
| OPENROUTER_API_KEY: "" |
| OPENAI_API_KEY: "" |
| NOUS_API_KEY: "" |
|
|