-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.7 KB
/
ci.yml
File metadata and controls
73 lines (61 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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: Ruff lint
run: uv run ruff format .
- name: Ruff check
run: uv run ruff check
- 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: |
source .venv/bin/activate
AGENTS="${{ inputs.smoke_agents }}"
if [ -n "$AGENTS" ]; then
bash smoke_test.sh $AGENTS
else
bash smoke_test.sh
fi