Repository navigation
104 lines (88 loc) · 3.16 KB
/
Copy pathpytest.yml
File metadata and controls
104 lines (88 loc) · 3.16 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Python Tests
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_dispatch: # Allow manual trigger
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.os == 'ubuntu-26.04' && 'ubuntu-latest' || matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-26.04, windows-2025]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/[email protected]
with:
version: "latest"
- name: Set up Docker
uses: docker/setup-docker-action@v5
with:
version: "latest"
- name: Set up Docker Compose
uses: docker/setup-compose-action@v2
with:
version: "latest"
- name: Set up Python 3.13
run: uv python pin 3.13
# dspy-rlm runs its REPL in a Deno sandbox; the deterministic dspy-rlm
# integration test needs Deno on the runner (no secret required).
- name: Install Deno
if: runner.os == 'Linux'
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: uv sync --all-packages --all-extras --locked
- name: Run non-runtime tests with coverage (Linux)
if: runner.os == 'Linux'
run: |
uv run pytest tests/ \
-m "not runtime" \
--cov=src/harbor \
--cov-report=term-missing
# The podman runtime suite needs the Podman API socket: `podman compose`
# delegates to the docker-compose provider, which connects to it.
# Without the socket, PodmanEnvironment.preflight() fails and the suite
# is skipped.
- name: Start Podman API socket (Linux)
if: runner.os == 'Linux'
run: |
systemctl --user enable --now podman.socket
podman info --format 'remote socket: {{.Host.RemoteSocket.Path}} (exists: {{.Host.RemoteSocket.Exists}})'
- name: Run runtime integration tests with coverage (Linux)
if: runner.os == 'Linux'
run: |
uv run pytest tests/ \
-m runtime \
-n 4 \
--dist load \
--cov=src/harbor \
--cov-append \
--cov-report=xml \
--cov-report=term-missing
- name: Run all tests with coverage (Windows)
if: runner.os == 'Windows'
run: |
uv run pytest tests/ --cov=src/harbor --cov-report=xml --cov-report=term-missing --ignore=tests/unit/agents/installed/test_agent_install_execution.py -m "not runtime and not windows_containers" -k "not test_full_task_mapping"
- name: Run Windows container integration tests
if: runner.os == 'Windows'
run: |
uv run pytest tests/ -m "windows_containers" -v
- name: Upload coverage to Codecov
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: codecov/codecov-action@v6
with:
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}