Skip to content

make tests faster 2

make tests faster 2 #5

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
inputs:
run_smoke_tests:
description: "Run smoke tests"
type: boolean
default: true
smoke_agents:
description: "Agents to smoke-test (space-separated, empty = all)"
type: string
default: ""
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
python-version: "3.11"
- name: Install dependencies
run: uv sync --group dev
- name: Run pytest
run: uv run pytest tests/ -v --tb=short
smoke-tests:
name: Smoke tests
runs-on: ubuntu-latest
# Run on manual dispatch (when opted in) or on push/PR to main
if: |
(github.event_name == 'workflow_dispatch' && inputs.run_smoke_tests) ||
(github.event_name != 'workflow_dispatch' && github.ref == 'refs/heads/main')
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
python-version: "3.11"
- name: Install dependencies
run: uv sync
- name: Make scripts executable
run: chmod +x run_local.sh smoke_test.sh
- name: Run smoke tests
run: |
AGENTS="${{ inputs.smoke_agents }}"
if [ -n "$AGENTS" ]; then
bash smoke_test.sh $AGENTS
else
bash smoke_test.sh
fi