Skip to content

Commit a79c21c

Browse files
authored
[CI] Update to Swift 6 CI (#122)
# 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
1 parent 26547e7 commit a79c21c

File tree

4 files changed

+50
-58
lines changed

4 files changed

+50
-58
lines changed

.github/workflows/pull_request.yml

+27-35
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,35 @@
11
name: PR
22

33
on:
4-
pull_request:
5-
types: [opened, reopened, synchronize]
4+
pull_request:
5+
types: [opened, reopened, synchronize]
66

77
jobs:
8-
soundness:
9-
name: Soundness
10-
uses: apple/swift-nio/.github/workflows/soundness.yml@main
11-
with:
12-
api_breakage_check_enabled: true
13-
broken_symlink_check_enabled: true
14-
docs_check_enabled: true
15-
format_check_enabled: true
16-
license_header_check_enabled: true
17-
license_header_check_project_name: "SwiftOpenAPIGenerator"
18-
shell_check_enabled: true
19-
unacceptable_language_check_enabled: true
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
license_header_check_project_name: "SwiftOpenAPIGenerator"
2013

21-
unit-tests:
22-
name: Unit tests
23-
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
24-
with:
25-
linux_5_8_enabled: false
26-
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
27-
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
28-
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
29-
linux_nightly_main_enabled: false
14+
unit-tests:
15+
name: Unit tests
16+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
17+
with:
18+
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
19+
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
20+
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
21+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
22+
linux_nightly_main_enabled: false
3023

31-
integration-test:
32-
name: Integration test
33-
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
34-
with:
35-
name: "Integration test"
36-
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
37-
matrix_linux_5_8_enabled: false
38-
matrix_linux_nightly_main_enabled: false
24+
integration-test:
25+
name: Integration test
26+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
27+
with:
28+
name: "Integration test"
29+
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
30+
matrix_linux_nightly_main_enabled: false
3931

40-
swift-6-language-mode:
41-
name: Swift 6 Language Mode
42-
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
43-
if: false # Disabled for now.
32+
swift-6-language-mode:
33+
name: Swift 6 Language Mode
34+
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
35+
if: false # Disabled for now.

.github/workflows/scheduled.yml

+17-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
name: Scheduled
22

33
on:
4-
schedule:
5-
- cron: "0 8,20 * * *"
4+
schedule:
5+
- cron: "0 8,20 * * *"
66

77
jobs:
8-
unit-tests:
9-
name: Unit tests
10-
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
11-
with:
12-
linux_5_8_enabled: false
13-
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
14-
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
15-
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
16-
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
8+
unit-tests:
9+
name: Unit tests
10+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
11+
with:
12+
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
13+
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
14+
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
15+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
16+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
1717

18-
integration-test:
19-
name: Integration test
20-
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
21-
with:
22-
name: "Integration test"
23-
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
24-
matrix_linux_5_8_enabled: false
18+
integration-test:
19+
name: Integration test
20+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
21+
with:
22+
name: "Integration test"
23+
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"

.spi.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: 1
22
builder:
33
configs:
4-
- documentation_targets:
5-
- OpenAPIRuntime
4+
- documentation_targets:
5+
- OpenAPIRuntime

Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ where Upstream.Element == ArraySlice<UInt8> {
2929
private let upstream: Upstream
3030

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

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

0 commit comments

Comments
 (0)