diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 680cdab..acec289 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: -ignore-filename-regex="\/Tests\/" \ -instr-profile=.build/debug/codecov/default.profdata > info.lcov - name: Upload to codecov.io - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: file: info.lcov linux: @@ -57,6 +57,6 @@ jobs: -ignore-filename-regex="\/Tests\/" \ -instr-profile .build/debug/codecov/default.profdata > info.lcov - name: Upload to codecov.io - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: file: info.lcov diff --git a/Package.swift b/Package.swift index 35f423f..160f053 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,7 @@ let package = Package( .library(name: "HummingbirdCompression", targets: ["HummingbirdCompression"]), ], dependencies: [ - .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "1.0.0-alpha"), + .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "1.0.0-rc"), .package(url: "https://github.com/adam-fowler/compress-nio.git", from: "0.4.0"), .package(url: "https://github.com/apple/swift-nio.git", from: "2.32.1"), ], diff --git a/Tests/HummingbirdCompressionTests/CompressionTests.swift b/Tests/HummingbirdCompressionTests/CompressionTests.swift index 3c6e377..635e487 100644 --- a/Tests/HummingbirdCompressionTests/CompressionTests.swift +++ b/Tests/HummingbirdCompressionTests/CompressionTests.swift @@ -39,7 +39,7 @@ class HummingBirdCompressionTests: XCTestCase { defer { app.XCTStop() } let testBuffer = self.randomBuffer(size: Int.random(in: 64000...261_335)) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in var body = response.body let uncompressed = try body?.decompress(with: .gzip) XCTAssertEqual(uncompressed, testBuffer) @@ -57,7 +57,7 @@ class HummingBirdCompressionTests: XCTestCase { defer { app.XCTStop() } let testBuffer = self.randomBuffer(size: 261_335) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in var body = response.body let uncompressed = try body?.decompress(with: .gzip) XCTAssertEqual(uncompressed, testBuffer) @@ -132,7 +132,7 @@ class HummingBirdCompressionTests: XCTestCase { let testBuffer = self.randomBuffer(size: 261_335) var testBufferCopy = testBuffer let compressedBuffer = try testBufferCopy.compress(with: .gzip) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in XCTAssertEqual(response.body, testBuffer) } } @@ -150,7 +150,7 @@ class HummingBirdCompressionTests: XCTestCase { let testBuffer = self.randomBuffer(size: 261_335) var testBufferCopy = testBuffer let compressedBuffer = try testBufferCopy.compress(with: .gzip) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in XCTAssertEqual(response.body, testBuffer) } } @@ -254,7 +254,7 @@ class HummingBirdCompressionTests: XCTestCase { defer { app.XCTStop() } let testBuffer = self.randomBuffer(size: 261_335) - app.XCTExecute(uri: "/echo", method: .GET, body: testBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, body: testBuffer) { response in XCTAssertEqual(response.body, testBuffer) } } @@ -272,7 +272,7 @@ class HummingBirdCompressionTests: XCTestCase { let testBuffer = self.randomBuffer(size: 150_000) var testBufferCopy = testBuffer let compressedBuffer = try testBufferCopy.compress(with: .gzip) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in XCTAssertEqual(response.status, .payloadTooLarge) } } @@ -294,7 +294,7 @@ class HummingBirdCompressionTests: XCTestCase { } var testBufferCopy = testBuffer let compressedBuffer = try testBufferCopy.compress(with: .gzip) - app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in + try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in XCTAssertEqual(response.status, .payloadTooLarge) } }