Skip to content

Commit f975cee

Browse files
committed
add(testing): tag smoke and integration suites
1 parent 3931e4c commit f975cee

14 files changed

Lines changed: 58 additions & 21 deletions

Tests/AgentRunKitTests/Integration/IntegrationTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENROUTER_API_KEY"] ?
66
private let hasAPIKey = !apiKey.isEmpty
77
private let defaultModel = "google/gemini-3-flash-preview"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
9+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.provider, .requiresNetwork))
1010
struct OpenAIClientIntegrationTests {
1111
let client = OpenAIClient(
1212
apiKey: apiKey,
@@ -71,7 +71,7 @@ struct OpenAIClientIntegrationTests {
7171
}
7272
}
7373

74-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
74+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.requiresNetwork))
7575
struct AgentIntegrationTests {
7676
@Test
7777
func agentCompletesWithFinishTool() async throws {
@@ -188,7 +188,7 @@ private struct EchoOutput: Codable {
188188
let echoed: String
189189
}
190190

191-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
191+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.requiresNetwork))
192192
struct AutoSchemaIntegrationTests {
193193
@Test
194194
func autoSchemaToolWithRealLLM() async throws {
@@ -262,7 +262,7 @@ private actor ExecutionTimeTracker {
262262
}
263263
}
264264

265-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
265+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.requiresNetwork, .slow))
266266
struct ParallelExecutionIntegrationTests {
267267
@Test
268268
func parallelToolsExecuteConcurrently() async throws {

Tests/AgentRunKitTests/Integration/StreamingIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENROUTER_API_KEY"] ?
66
private let hasAPIKey = !apiKey.isEmpty
77
private let defaultModel = "google/gemini-3-flash-preview"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
9+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.streaming, .requiresNetwork))
1010
struct StreamingIntegrationTests {
1111
let client = OpenAIClient(
1212
apiKey: apiKey,

Tests/AgentRunKitTests/Integration/StructuredOutputIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private struct TestExercise: Codable, SchemaProviding {
3232
}
3333
}
3434

35-
@Suite(.disabled(if: apiKey == nil, "Requires OPENROUTER_API_KEY environment variable"))
35+
@Suite(.disabled(if: apiKey == nil, "Requires OPENROUTER_API_KEY environment variable"), .tags(.requiresNetwork))
3636
struct StructuredOutputIntegrationTests {
3737
let client: OpenAIClient
3838

Tests/AgentRunKitTests/Smoke/AnthropicSmokeTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ private let cachingSystemPrompt = String(
1111
count: 150
1212
)
1313

14-
@Suite(.enabled(if: hasAPIKey, "Requires ANTHROPIC_API_KEY environment variable"))
14+
@Suite(
15+
.enabled(if: hasAPIKey, "Requires ANTHROPIC_API_KEY environment variable"),
16+
.tags(.smoke, .provider, .requiresNetwork)
17+
)
1518
struct AnthropicSmokeTests {
1619
private func makeClient() throws -> AnthropicClient {
1720
try AnthropicClient(apiKey: apiKey, model: model, maxTokens: 1024)

Tests/AgentRunKitTests/Smoke/ContextManagementSmokeTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENROUTER_API_KEY"] ?
66
private let hasAPIKey = !apiKey.isEmpty
77
private let model = ProcessInfo.processInfo.environment["SMOKE_OPENROUTER_MODEL"] ?? "google/gemini-3-flash-preview"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
9+
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"), .tags(.smoke, .requiresNetwork))
1010
struct ContextManagementSmokeTests {
1111
let client = OpenAIClient(
1212
apiKey: apiKey,

Tests/AgentRunKitTests/Smoke/GeminiSmokeTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private let apiKey = ProcessInfo.processInfo.environment["GEMINI_API_KEY"] ?? ""
66
private let hasAPIKey = !apiKey.isEmpty
77
private let model = ProcessInfo.processInfo.environment["SMOKE_GEMINI_MODEL"] ?? "gemini-3-flash-preview"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires GEMINI_API_KEY environment variable"))
9+
@Suite(
10+
.enabled(if: hasAPIKey, "Requires GEMINI_API_KEY environment variable"),
11+
.tags(.smoke, .provider, .requiresNetwork)
12+
)
1013
struct GeminiSmokeTests {
1114
let client = GeminiClient(apiKey: apiKey, model: model, maxOutputTokens: 1024)
1215

Tests/AgentRunKitTests/Smoke/OpenAISmokeTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
66
private let hasAPIKey = !apiKey.isEmpty
77
private let model = ProcessInfo.processInfo.environment["SMOKE_OPENAI_CHAT_MODEL"] ?? "gpt-5.4-mini"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENAI_API_KEY environment variable"))
9+
@Suite(
10+
.enabled(if: hasAPIKey, "Requires OPENAI_API_KEY environment variable"),
11+
.tags(.smoke, .provider, .requiresNetwork)
12+
)
1013
struct OpenAISmokeTests {
1114
let client = OpenAIClient.openAI(
1215
apiKey: apiKey,

Tests/AgentRunKitTests/Smoke/OpenRouterSmokeTests.swift

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENROUTER_API_KEY"] ?
66
private let hasAPIKey = !apiKey.isEmpty
77
private let model = ProcessInfo.processInfo.environment["SMOKE_OPENROUTER_MODEL"] ?? "google/gemini-3-flash-preview"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"))
9+
@Suite(
10+
.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY environment variable"),
11+
.tags(.smoke, .provider, .requiresNetwork)
12+
)
1013
struct OpenRouterSmokeTests {
1114
let client = OpenAIClient.openRouter(
1215
apiKey: apiKey,
@@ -135,7 +138,10 @@ struct OpenRouterSmokeTests {
135138
private let reasoningModel = ProcessInfo.processInfo.environment["SMOKE_OPENROUTER_REASONING_MODEL"]
136139
?? "z-ai/glm-5"
137140

138-
@Suite(.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY"))
141+
@Suite(
142+
.enabled(if: hasAPIKey, "Requires OPENROUTER_API_KEY"),
143+
.tags(.smoke, .provider, .requiresNetwork)
144+
)
139145
struct OpenRouterReplayPolicySmokeTests {
140146
let client = OpenAIClient.openRouter(
141147
apiKey: apiKey,
@@ -208,8 +214,13 @@ private let responsesModel =
208214
ProcessInfo.processInfo.environment["SMOKE_OPENROUTER_RESPONSES_MODEL"] ?? ""
209215
private let hasResponsesModel = !responsesModel.isEmpty
210216

211-
@Suite(.enabled(if: hasAPIKey && hasResponsesModel,
212-
"Requires OPENROUTER_API_KEY and SMOKE_OPENROUTER_RESPONSES_MODEL"))
217+
@Suite(
218+
.enabled(
219+
if: hasAPIKey && hasResponsesModel,
220+
"Requires OPENROUTER_API_KEY and SMOKE_OPENROUTER_RESPONSES_MODEL"
221+
),
222+
.tags(.smoke, .provider, .requiresNetwork)
223+
)
213224
struct OpenRouterResponsesSmokeTests {
214225
func makeClient() -> ResponsesAPIClient {
215226
ResponsesAPIClient(

Tests/AgentRunKitTests/Smoke/ResponsesAPISmokeTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private let apiKey = ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
66
private let hasAPIKey = !apiKey.isEmpty
77
private let model = ProcessInfo.processInfo.environment["SMOKE_OPENAI_RESPONSES_MODEL"] ?? "gpt-5.4-mini"
88

9-
@Suite(.enabled(if: hasAPIKey, "Requires OPENAI_API_KEY environment variable"))
9+
@Suite(
10+
.enabled(if: hasAPIKey, "Requires OPENAI_API_KEY environment variable"),
11+
.tags(.smoke, .provider, .requiresNetwork)
12+
)
1013
struct ResponsesAPISmokeTests {
1114
func makeClient() -> ResponsesAPIClient {
1215
ResponsesAPIClient(

Tests/AgentRunKitTests/Smoke/ResumeCheckpointSmokeTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private let anthropicAPIKey = ProcessInfo.processInfo.environment["ANTHROPIC_API
66
private let hasAnthropicKey = !anthropicAPIKey.isEmpty
77
private let anthropicModel = ProcessInfo.processInfo.environment["SMOKE_ANTHROPIC_MODEL"] ?? "claude-sonnet-4-6"
88

9-
@Suite(.enabled(if: hasAnthropicKey, "Requires ANTHROPIC_API_KEY environment variable"))
9+
@Suite(
10+
.enabled(if: hasAnthropicKey, "Requires ANTHROPIC_API_KEY environment variable"),
11+
.tags(.smoke, .checkpointing, .requiresNetwork)
12+
)
1013
struct ResumeCheckpointSmokeTests {
1114
private func makeClient() throws -> AnthropicClient {
1215
try AnthropicClient(apiKey: anthropicAPIKey, model: anthropicModel, maxTokens: 1024)

0 commit comments

Comments
 (0)