Skip to content

Commit fed2a2f

Browse files
authored
Merge pull request #11 from untra/feature/kanban-integration-tests
integration tests for jira, linear and github . api version checking
2 parents fd41964 + b044bdd commit fed2a2f

File tree

121 files changed

+6675
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+6675
-406
lines changed

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
3+
"permissions": {
4+
"allow": [
5+
],
6+
"ask": [
7+
"Bash(git commit*)"
8+
],
9+
"deny": [
10+
"Bash(git revert*)",
11+
"Bash(git checkout*)",
12+
"Bash(git rebase*)"
13+
]
14+
}
15+
}

.github/workflows/build.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060

6161
coverage:
6262
needs: lint-test
63+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
6364
runs-on: ubuntu-latest
6465
steps:
6566
- uses: actions/checkout@v4
@@ -82,8 +83,35 @@ jobs:
8283
- name: Install cargo-llvm-cov
8384
uses: taiki-e/install-action@cargo-llvm-cov
8485

86+
- name: Configure Git for tests
87+
run: |
88+
git config user.email "[email protected]"
89+
git config user.name "CI"
90+
git remote set-head origin --auto || true
91+
8592
- name: Generate coverage
86-
run: cargo llvm-cov --all-features --codecov --output-path codecov.json
93+
env:
94+
# Jira integration test credentials
95+
OPERATOR_JIRA_DOMAIN: ${{ secrets.OPERATOR_JIRA_DOMAIN }}
96+
OPERATOR_JIRA_EMAIL: ${{ secrets.OPERATOR_JIRA_EMAIL }}
97+
OPERATOR_JIRA_API_KEY: ${{ secrets.OPERATOR_JIRA_API_KEY }}
98+
OPERATOR_JIRA_TEST_PROJECT: ${{ secrets.OPERATOR_JIRA_TEST_PROJECT }}
99+
# Linear integration test credentials
100+
OPERATOR_LINEAR_API_KEY: ${{ secrets.OPERATOR_LINEAR_API_KEY }}
101+
OPERATOR_LINEAR_TEST_TEAM: ${{ secrets.OPERATOR_LINEAR_TEST_TEAM }}
102+
# Git integration test flags
103+
OPERATOR_GIT_TEST_ENABLED: 'true'
104+
OPERATOR_GIT_PUSH_ENABLED: 'true'
105+
run: cargo llvm-cov --all-features --codecov --output-path codecov.json -- --test-threads=1
106+
107+
- name: Cleanup optest branches
108+
if: always()
109+
run: |
110+
git fetch --prune origin
111+
for branch in $(git branch -r | grep 'origin/optest/' | sed 's|origin/||' | xargs); do
112+
echo "Cleaning up orphaned test branch: $branch"
113+
git push origin --delete "$branch" || true
114+
done
87115
88116
- name: Upload to Codecov
89117
uses: codecov/codecov-action@v5
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/api/providers/kanban/**'
9+
- 'src/git/**'
10+
- 'tests/kanban_integration.rs'
11+
- 'tests/git_integration.rs'
12+
- '.github/workflows/integration-tests.yml'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- 'src/api/providers/kanban/**'
18+
- 'src/git/**'
19+
- 'tests/kanban_integration.rs'
20+
- 'tests/git_integration.rs'
21+
workflow_dispatch:
22+
inputs:
23+
run_jira:
24+
description: 'Run Jira integration tests'
25+
type: boolean
26+
default: true
27+
run_linear:
28+
description: 'Run Linear integration tests'
29+
type: boolean
30+
default: true
31+
run_git:
32+
description: 'Run Git integration tests'
33+
type: boolean
34+
default: true
35+
run_git_push:
36+
description: 'Run Git push tests (creates/deletes optest/ branches)'
37+
type: boolean
38+
default: false
39+
40+
jobs:
41+
integration-tests:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0 # Full history needed for git operations
48+
49+
- name: Configure Git for tests
50+
run: |
51+
git config user.email "[email protected]"
52+
git config user.name "CI"
53+
# Set origin/HEAD if not set (needed for get_default_branch)
54+
git remote set-head origin --auto || true
55+
56+
- name: Install Rust toolchain
57+
uses: dtolnay/[email protected]
58+
59+
- name: Cache cargo
60+
uses: actions/cache@v4
61+
with:
62+
path: |
63+
~/.cargo/registry
64+
~/.cargo/git
65+
target
66+
key: ${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
67+
restore-keys: ${{ runner.os }}-cargo-integration-
68+
69+
- name: Run Jira integration tests
70+
if: >-
71+
(github.event_name != 'workflow_dispatch' || inputs.run_jira) &&
72+
env.OPERATOR_JIRA_DOMAIN != ''
73+
env:
74+
OPERATOR_JIRA_DOMAIN: ${{ secrets.OPERATOR_JIRA_DOMAIN }}
75+
OPERATOR_JIRA_EMAIL: ${{ secrets.OPERATOR_JIRA_EMAIL }}
76+
OPERATOR_JIRA_API_KEY: ${{ secrets.OPERATOR_JIRA_API_KEY }}
77+
OPERATOR_JIRA_TEST_PROJECT: ${{ secrets.OPERATOR_JIRA_TEST_PROJECT }}
78+
run: cargo test --test kanban_integration jira_tests -- --nocapture --test-threads=1
79+
80+
- name: Run Linear integration tests
81+
if: >-
82+
(github.event_name != 'workflow_dispatch' || inputs.run_linear) &&
83+
env.OPERATOR_LINEAR_API_KEY != ''
84+
env:
85+
OPERATOR_LINEAR_API_KEY: ${{ secrets.OPERATOR_LINEAR_API_KEY }}
86+
OPERATOR_LINEAR_TEST_TEAM: ${{ secrets.OPERATOR_LINEAR_TEST_TEAM }}
87+
run: cargo test --test kanban_integration linear_tests -- --nocapture --test-threads=1
88+
89+
- name: Run cross-provider tests
90+
env:
91+
OPERATOR_JIRA_DOMAIN: ${{ secrets.OPERATOR_JIRA_DOMAIN }}
92+
OPERATOR_JIRA_EMAIL: ${{ secrets.OPERATOR_JIRA_EMAIL }}
93+
OPERATOR_JIRA_API_KEY: ${{ secrets.OPERATOR_JIRA_API_KEY }}
94+
OPERATOR_JIRA_TEST_PROJECT: ${{ secrets.OPERATOR_JIRA_TEST_PROJECT }}
95+
OPERATOR_LINEAR_API_KEY: ${{ secrets.OPERATOR_LINEAR_API_KEY }}
96+
OPERATOR_LINEAR_TEST_TEAM: ${{ secrets.OPERATOR_LINEAR_TEST_TEAM }}
97+
run: cargo test --test kanban_integration test_provider_interface_consistency -- --nocapture
98+
99+
# Git Integration Tests
100+
- name: Run Git integration tests (read-only)
101+
if: github.event_name != 'workflow_dispatch' || inputs.run_git
102+
env:
103+
OPERATOR_GIT_TEST_ENABLED: 'true'
104+
run: cargo test --test git_integration -- --nocapture --test-threads=1
105+
106+
- name: Run Git push integration tests
107+
if: >-
108+
github.event_name == 'push' ||
109+
(github.event_name == 'workflow_dispatch' && inputs.run_git_push)
110+
env:
111+
OPERATOR_GIT_TEST_ENABLED: 'true'
112+
OPERATOR_GIT_PUSH_ENABLED: 'true'
113+
run: cargo test --test git_integration git_cli_branch_lifecycle_tests -- --nocapture --test-threads=1
114+
115+
- name: Cleanup optest branches
116+
if: always()
117+
run: |
118+
# Remove any remaining optest/ branches from remote
119+
git fetch --prune origin
120+
for branch in $(git branch -r | grep 'origin/optest/' | sed 's|origin/||' | xargs); do
121+
echo "Cleaning up orphaned test branch: $branch"
122+
git push origin --delete "$branch" || true
123+
done

bindings/Config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type { RestApiConfig } from "./RestApiConfig";
1414
import type { TemplatesConfig } from "./TemplatesConfig";
1515
import type { TmuxConfig } from "./TmuxConfig";
1616
import type { UiConfig } from "./UiConfig";
17+
import type { VersionCheckConfig } from "./VersionCheckConfig";
1718

1819
export type Config = {
1920
/**
@@ -23,4 +24,8 @@ projects: Array<string>, agents: AgentsConfig, notifications: NotificationsConfi
2324
/**
2425
* Kanban provider configuration for syncing issues from Jira, Linear, etc.
2526
*/
26-
kanban: KanbanConfig, };
27+
kanban: KanbanConfig,
28+
/**
29+
* Version check configuration for automatic update notifications
30+
*/
31+
version_check: VersionCheckConfig, };

bindings/DetectedTool.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ path: string,
1717
* Version string
1818
*/
1919
version: string,
20+
/**
21+
* Minimum required version for Operator compatibility
22+
*/
23+
min_version: string | null,
24+
/**
25+
* Whether the installed version meets the minimum requirement
26+
*/
27+
version_ok: boolean,
2028
/**
2129
* Available model aliases (e.g., ["opus", "sonnet", "haiku"])
2230
*/

bindings/VersionCheckConfig.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2+
3+
/**
4+
* Version check configuration for automatic update notifications
5+
*/
6+
export type VersionCheckConfig = {
7+
/**
8+
* Enable automatic version checking on startup
9+
*/
10+
enabled: boolean,
11+
/**
12+
* URL to fetch latest version from (optional, can be removed)
13+
*/
14+
url: string | null,
15+
/**
16+
* Timeout in seconds for version check HTTP request
17+
*/
18+
timeout_secs: bigint, };

config/default.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,13 @@ confirm_paired = true
8585

8686
# Delay between launching multiple agents (milliseconds)
8787
launch_delay_ms = 2000
88+
89+
[version_check]
90+
# Enable automatic version checking on startup
91+
enabled = true
92+
93+
# URL to fetch latest version from (set to null or remove to disable)
94+
url = "https://operator.untra.io/VERSION"
95+
96+
# Timeout for version check HTTP request (seconds)
97+
timeout_secs = 3

docs/VERSION.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: raw
3+
permalink: /VERSION
4+
---
5+
{{ site.version }}

docs/_layouts/raw.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ content }}

docs/_site/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@
310310
project</a></div><div><a class="sidebar-nav-item" href="https://github.com/untra/operator/tree/main/docs/404.html"><small>View this page
311311
source on Github</small></a></div></p>
312312
<p></p>
313-
<div><small class="sidebar-nav-item">Currently v0.1.7</small> |
313+
<div><small class="sidebar-nav-item">Currently v0.1.10</small> |
314314
<div id="theme-toggle" aria-label="Toggle theme">
315315
<div class="theme-icon-light"><small>lights on</small></div>
316316
<div class="theme-icon-dark"><small>lights off</small></div>
317317
</div>
318318
</div>
319-
</p><small class="sidebar-nav-item"><i>Last updated 2025-12-31</i></small></p>
319+
</p><small class="sidebar-nav-item"><i>Last updated 2026-01-08</i></small></p>
320320
</div>
321321
</nav>
322322

0 commit comments

Comments
 (0)