From 60f808c13fff7d3f3e2481e4f772c5e89f89b44d Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Tue, 15 Oct 2024 12:45:09 +0100 Subject: [PATCH 1/3] [CI] Update to Swift 6 CI # Motivation We just updated our CI matrix in NIO to only support 5.9, 5.10 and 6. # Modification This PR updates the trigger files in this repo. Since this repo was always 5.9+ this is easy. # Result Up to date CI --- .github/workflows/pull_request.yml | 12 ++---------- .github/workflows/scheduled.yml | 5 ++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index eaf36ac0..674db2cf 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -7,24 +7,17 @@ on: jobs: soundness: name: Soundness - uses: apple/swift-nio/.github/workflows/soundness.yml@main + uses: swiftlang/github-workflows/.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 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_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 @@ -34,7 +27,6 @@ jobs: 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: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 7a345603..5b7ac5fe 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -9,9 +9,9 @@ jobs: 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_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" @@ -20,5 +20,4 @@ jobs: 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 \ No newline at end of file + matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh" \ No newline at end of file From 62bb42937b2c42613ce6bf166e5f8546561035db Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Wed, 16 Oct 2024 09:37:17 +0100 Subject: [PATCH 2/3] Fix up docs --- .../EventStreams/ServerSentEventsDecoding.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift b/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift index ff374b39..34f51b21 100644 --- a/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift +++ b/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift @@ -29,8 +29,9 @@ where Upstream.Element == ArraySlice { 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) -> Bool /// Creates a new sequence. @@ -98,7 +99,7 @@ extension AsyncSequence where Element == ArraySlice, 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) -> Bool = { _ in true } From 4320d3ecc1d70bdbf1e2c39fde907a5fb514689d Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Wed, 16 Oct 2024 11:31:32 +0100 Subject: [PATCH 3/3] Fix yml --- .github/workflows/pull_request.yml | 54 +++++++++++++++--------------- .github/workflows/scheduled.yml | 34 +++++++++---------- .spi.yml | 4 +-- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 674db2cf..46ba74df 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,35 +1,35 @@ name: PR on: - pull_request: - types: [opened, reopened, synchronize] + pull_request: + types: [opened, reopened, synchronize] jobs: - soundness: - name: Soundness - uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main - with: - license_header_check_project_name: "SwiftOpenAPIGenerator" + 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_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 + 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_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_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. + 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. diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 5b7ac5fe..cd177af7 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1,23 +1,23 @@ name: Scheduled on: - schedule: - - cron: "0 8,20 * * *" + 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" + 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" \ No newline at end of file + 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" diff --git a/.spi.yml b/.spi.yml index 58e64aec..97fc4286 100644 --- a/.spi.yml +++ b/.spi.yml @@ -1,5 +1,5 @@ version: 1 builder: configs: - - documentation_targets: - - OpenAPIRuntime + - documentation_targets: + - OpenAPIRuntime