-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (124 loc) · 3.91 KB
/
Copy pathci.yml
File metadata and controls
153 lines (124 loc) · 3.91 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["main", "master"]
env:
# Node 20 action runtimes are deprecated (removed from runners Sept 2026);
# run JS actions on Node 24 ahead of the June 2026 default flip.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
lint:
name: Lint (ruff) + types (mypy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[api,telegram]"
pip install ruff mypy
- name: Ruff (lint + import order)
run: ruff check clk_harness tests
- name: Mypy (lenient type check)
run: mypy clk_harness/
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[api,telegram]"
pip install pytest pytest-asyncio httpx
- name: Run unit tests
run: pytest tests/ -v
env:
CLK_WORKSPACES_DIR: /tmp/clk-workspaces
- name: Run offline autonomous-mission e2e (shell provider, no network)
# Exercises the single-prompt mission, the done-gate / no-op guard, the
# charter-first ordering, and the commit trace end to end using the
# shell provider — no API keys or network access required.
run: pytest user_tests/test_mission_e2e.py -v
env:
CLK_PROVIDER: shell
CLK_WORKSPACES_DIR: /tmp/clk-workspaces
webui:
name: Web UI (build + unit tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: webui/package-lock.json
- name: Install web UI deps
run: npm ci
working-directory: webui
- name: Type-check & build
run: npm run build
working-directory: webui
- name: Unit tests (vitest)
run: npm run test
working-directory: webui
- name: Upload built bundle
uses: actions/upload-artifact@v4
with:
name: webui-dist
path: clk_harness/webui_dist
if-no-files-found: error
web-e2e:
name: Web UI end-to-end
runs-on: ubuntu-latest
needs: [test, webui]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[api]"
pip install pytest pytest-asyncio httpx
- name: Download built web UI bundle
uses: actions/download-artifact@v4
with:
name: webui-dist
path: clk_harness/webui_dist
- name: Run web UI end-to-end tests
run: pytest user_tests/test_webui_e2e.py -v
docker-e2e:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run Docker end-to-end tests
run: pytest user_tests/test_docker_e2e.py -v
env:
CLK_DOCKER_TEST_IMAGE: clk-e2e-test:ci