Skip to content

Commit

Permalink
Merge branch 'main' into hd-mime-type-params
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 authored Nov 18, 2024
2 parents b240a07 + 2cb09fb commit a2790bd
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 66 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Main

on:
push:
branches: [main]
schedule:
- cron: "0 8,20 * * *"

jobs:
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

integration-test:
name: Integration test
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration test"
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
59 changes: 23 additions & 36 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,30 @@
name: PR

on:
pull_request:
types: [opened, reopened, synchronize]
pull_request:
types: [opened, reopened, synchronize]

jobs:
soundness:
name: Soundness
uses: apple/swift-nio/.github/workflows/soundness.yml@main
with:
api_breakage_check_enabled: true
broken_symlink_check_enabled: true
docs_check_enabled: true
format_check_enabled: true
license_header_check_enabled: true
license_header_check_project_name: "SwiftOpenAPIGenerator"
shell_check_enabled: true
unacceptable_language_check_enabled: true
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "SwiftOpenAPIGenerator"

unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_enabled: false
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_enabled: false
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_enabled: false

integration-test:
name: Integration test
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration test"
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
matrix_linux_5_8_enabled: false
matrix_linux_nightly_main_enabled: false

swift-6-language-mode:
name: Swift 6 Language Mode
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
if: false # Disabled for now.
integration-test:
name: Integration test
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration test"
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
matrix_linux_nightly_main_enabled: false
24 changes: 0 additions & 24 deletions .github/workflows/scheduled.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
builder:
configs:
- documentation_targets:
- OpenAPIRuntime
- documentation_targets:
- OpenAPIRuntime
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let swiftSettings: [SwiftSetting] = [
let package = Package(
name: "swift-openapi-runtime",
platforms: [
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
],
products: [
.library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ where Upstream.Element == ArraySlice<UInt8> {
private let upstream: Upstream

/// A closure that determines whether the given byte chunk should be forwarded to the consumer.
/// - Parameter: A byte chunk.
/// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence.
///
/// The closure should return `true` if the byte chunk should be forwarded and
/// `false` if this byte chunk is the terminating sequence.
private let predicate: @Sendable (ArraySlice<UInt8>) -> Bool

/// Creates a new sequence.
Expand Down Expand Up @@ -98,7 +99,7 @@ extension AsyncSequence where Element == ArraySlice<UInt8>, Self: Sendable {
/// Returns another sequence that decodes each event's data as the provided type using the provided decoder.
///
/// Use this method if the event's `data` field is not JSON, or if you don't want to parse it using `asDecodedServerSentEventsWithJSONData`.
/// - Parameter: A closure that determines whether the given byte chunk should be forwarded to the consumer.
/// - Parameter predicate: A closure that determines whether the given byte chunk should be forwarded to the consumer.
/// - Returns: A sequence that provides the events.
public func asDecodedServerSentEvents(
while predicate: @escaping @Sendable (ArraySlice<UInt8>) -> Bool = { _ in true }
Expand Down

0 comments on commit a2790bd

Please sign in to comment.